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

Side by Side Diff: third_party/WebKit/LayoutTests/csspaint/paint2d-transform.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 #output {
8 width: 200px;
9 height: 200px;
10 background-image: paint(transform);
11 }
12 </style>
13 </head>
14 <body>
15 <div id="output"></div>
16
17 <script id="code" type="text/worklet">
18 registerPaint('transform', class {
19 paint(ctx, geom) {
20 ctx.fillStyle = 'green';
21 ctx.transform(1, 0.5, 0, 1, 20, 20);
22 ctx.fillRect(0, 0, 50, 50);
23
24 ctx.resetTransform();
25
26 ctx.fillStyle = 'blue';
27 ctx.translate(150, 60);
28 ctx.rotate(60 * Math.PI / 180);
29 ctx.scale(1.5, 1);
30 ctx.fillRect(0, 0, 50, 50);
31 }
32 });
33 </script>
34
35 <script>
36 importPaintWorkletAndTerminateTestAfterAsyncPaint(document.getElementById('c ode').textContent);
37 </script>
38 </body>
39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698