| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 | 2 |
| 3 <!-- READ BEFORE UPDATING: | 3 <!-- READ BEFORE UPDATING: |
| 4 If this test is updated make sure to increment the "revision" value of the | 4 If this test is updated make sure to increment the "revision" value of the |
| 5 associated test in content/test/gpu/page_sets/pixel_tests.py. This will ensure | 5 associated test in content/test/gpu/page_sets/pixel_tests.py. This will ensure |
| 6 that the baseline images are regenerated on the next run. | 6 that the baseline images are regenerated on the next run. |
| 7 --> | 7 --> |
| 8 | 8 |
| 9 <html> | 9 <html> |
| 10 <head> | 10 <head> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 var canvas = document.getElementById("c"); | 28 var canvas = document.getElementById("c"); |
| 29 var c2d = canvas.getContext("2d"); | 29 var c2d = canvas.getContext("2d"); |
| 30 c2d.clearRect(0, 0, canvas.width, canvas.height); | 30 c2d.clearRect(0, 0, canvas.width, canvas.height); |
| 31 c2d.fillStyle = "rgba(255, 0, 0, 0.5)"; | 31 c2d.fillStyle = "rgba(255, 0, 0, 0.5)"; |
| 32 c2d.fillRect(50, 50, 100, 100); | 32 c2d.fillRect(50, 50, 100, 100); |
| 33 } | 33 } |
| 34 | 34 |
| 35 function waitForFinish() | 35 function waitForFinish() |
| 36 { | 36 { |
| 37 if (g_swapsBeforeAck == 0) { | 37 if (g_swapsBeforeAck == 0) { |
| 38 domAutomationController.setAutomationId(1); | |
| 39 domAutomationController.send("SUCCESS"); | 38 domAutomationController.send("SUCCESS"); |
| 40 } else { | 39 } else { |
| 41 g_swapsBeforeAck--; | 40 g_swapsBeforeAck--; |
| 42 document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1; | 41 document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1; |
| 43 window.requestAnimationFrame(waitForFinish); | 42 window.requestAnimationFrame(waitForFinish); |
| 44 } | 43 } |
| 45 } | 44 } |
| 46 </script> | 45 </script> |
| 47 </head> | 46 </head> |
| 48 <body onload="main()"> | 47 <body onload="main()"> |
| 49 <div style="position:relative; width:300px; height:300px; background-color:black
"> | 48 <div style="position:relative; width:300px; height:300px; background-color:black
"> |
| 50 </div> | 49 </div> |
| 51 <div id="container" style="position:absolute; top:0px; left:0px"> | 50 <div id="container" style="position:absolute; top:0px; left:0px"> |
| 52 <!-- | 51 <!-- |
| 53 Canvas acceleration requires that the canvas be at least 256x257. | 52 Canvas acceleration requires that the canvas be at least 256x257. |
| 54 --> | 53 --> |
| 55 <canvas id="c" width="300" height="300" class="nomargin"></canvas> | 54 <canvas id="c" width="300" height="300" class="nomargin"></canvas> |
| 56 </div> | 55 </div> |
| 57 </body> | 56 </body> |
| 58 </html> | 57 </html> |
| OLD | NEW |