OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script> | 4 <script> |
5 // This browser pixel test checks if the 2D canvas is properly displayed | 5 // This browser pixel test checks if the 2D canvas is properly displayed |
6 // when the color space is set to linear-rgb. | 6 // when the color space is set to linear-rgb. |
7 | 7 |
8 var g_swapsBeforeAck = 15; | 8 var g_swapsBeforeAck = 15; |
9 | 9 |
10 function main() | 10 function main() |
(...skipping 11 matching lines...) Expand all Loading... |
22 ctx.fillRect(70,20,50,50); | 22 ctx.fillRect(70,20,50,50); |
23 ctx.fillStyle = 'blue'; | 23 ctx.fillStyle = 'blue'; |
24 ctx.fillRect(20,70,50,50); | 24 ctx.fillRect(20,70,50,50); |
25 ctx.fillStyle = 'black'; | 25 ctx.fillStyle = 'black'; |
26 ctx.fillRect(70,70,50,50); | 26 ctx.fillRect(70,70,50,50); |
27 } | 27 } |
28 | 28 |
29 function waitForFinish() | 29 function waitForFinish() |
30 { | 30 { |
31 if (g_swapsBeforeAck == 0) { | 31 if (g_swapsBeforeAck == 0) { |
32 domAutomationController.setAutomationId(1); | |
33 domAutomationController.send("SUCCESS"); | 32 domAutomationController.send("SUCCESS"); |
34 } else { | 33 } else { |
35 g_swapsBeforeAck--; | 34 g_swapsBeforeAck--; |
36 document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1; | 35 document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1; |
37 window.requestAnimationFrame(waitForFinish); | 36 window.requestAnimationFrame(waitForFinish); |
38 } | 37 } |
39 } | 38 } |
40 </script> | 39 </script> |
41 </head> | 40 </head> |
42 <body onload="main()"> | 41 <body onload="main()"> |
43 <div id="container" style="position:absolute; top:0px; left:0px"> | 42 <div id="container" style="position:absolute; top:0px; left:0px"> |
44 <canvas id="c" width="140" height="140"></canvas> | 43 <canvas id="c" width="140" height="140"></canvas> |
45 </div> | 44 </div> |
46 </body> | 45 </body> |
47 </html> | 46 </html> |
OLD | NEW |