Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / canvas-render-layer.html
blobb1779569a6d64b6f79f295eb79107a3ef4b7e5e7
1 <!DOCTYPE html>
2 <!--The test makes four canvases. The first never receives a getContext. The
3 second is rendered into immediately. The third and fourth are rendered
4 into with from nested setTimeout callbacks. When the canvases are accelerated
5 we expect that the latter three are all placed in render layers while
6 the first is not.-->
7 <html>
8 <body style="line-height: 0;">
9 <canvas id="A" width=100 height=100></canvas><canvas id="B" width=100 height=100></canvas><canvas id="C" width=100 height=100></canvas><canvas id="D" width=100 height=100></canvas>
10 <script type="text/javascript" charset="utf-8">
11 if (window.testRunner)
12 testRunner.waitUntilDone();
14 function doTest() {
15 var contextB = document.getElementById("B").getContext("2d");
16 contextB.fillStyle = "#00C000";
17 contextB.fillRect(0, 0, 100, 100);
19 window.setTimeout(function() {
20 var contextD = document.getElementById("D").getContext("2d");
21 contextD.fillStyle = "#00C000";
22 contextD.fillRect(0, 0, 100, 100);
24 window.setTimeout(function() {
25 var contextC = document.getElementById("C").getContext("2d");
26 contextC.fillStyle = "#00C000";
27 contextC.fillRect(0, 0, 100, 100);
28 if (window.testRunner)
29 testRunner.notifyDone();
30 }, 0);
32 }, 0);
34 window.addEventListener('load', doTest, false);
35 </script>
36 </body>
37 </html>