Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: third_party/WebKit/LayoutTests/csspaint/paint-function-arguments.html

Issue 2868003002: CSSPaint: Move layout tests in csspaint/ to http/tests/csspaint/ (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/run-after-layout-and-paint.js"></script>
5 <script src="resources/test-runner-paint-worklet.js"></script>
6 <style>
7 .container {
8 width: 200px;
9 height: 200px;
10 }
11
12 #canvas-box-1 {
13 background-image: paint(box, rgb(50, 100, 150), 5px);
14 }
15
16 #canvas-box-2 {
17 background-image: paint(box, rgb(150, 100, 50), 10px);
18 }
19
20 #background {
21 background-color: yellow;
22 display: inline-block;
23 }
24 </style>
25 </head>
26 <body>
27
28 <div id="background">
29 <div id="canvas-box-1" class="container"></div>
30 <div id="canvas-box-2" class="container"></div>
31 </div>
32
33 <script id="code" type="text/worklet">
34 registerPaint('box', class {
35 static get alpha() { return true; }
36 static get inputArguments() { return ['<color>', '<length>']; }
37 paint(ctx, geom, properties, args) {
38 ctx.strokeStyle = args[0].cssText;
39 ctx.lineWidth = args[1].cssText;
40 ctx.strokeRect(40, 40, 120, 120);
41 }
42 });
43
44 </script>
45
46 <script>
47 importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('cod e').textContent);
48 </script>
49 </body>
50 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698