Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / fill-stroke-clip-reset-path.html
blob126ed9e7f880bf1fdd47a31ea5adefdfa5c28b01
1 <html>
2 <head>
3 <script>
4 function testOne(operation)
6 var context = document.getElementById(operation).getContext('2d');
8 context.fillStyle = "red";
9 context.fillRect(0, 0, 1000, 1000);
11 context.moveTo(0, 0);
12 context.lineTo(0, 1000);
13 context.lineTo(1000, 1000);
14 context.lineTo(1000, 0);
15 context.closePath();
16 context[operation]();
18 context.fillStyle = "green";
19 context.fill();
21 function test()
23 testOne("fill");
24 testOne("stroke");
25 testOne("clip");
27 </script>
28 </head>
29 <body onload="test()">
30 <p>All three of these small canvases should be green, not red.</p>
31 <canvas id="fill" width="20" height="20"></canvas>
32 <canvas id="stroke" width="20" height="20"></canvas>
33 <canvas id="clip" width="20" height="20"></canvas>
34 </body>
35 </html>