| 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 28 matching lines...) Expand all Loading... |
| 39 return; | 39 return; |
| 40 } | 40 } |
| 41 | 41 |
| 42 if (!setup(gl)) { | 42 if (!setup(gl)) { |
| 43 console.log('Failed to set up GL: ' + gl); | 43 console.log('Failed to set up GL: ' + gl); |
| 44 domAutomationController.setAutomationId(1); | 44 domAutomationController.setAutomationId(1); |
| 45 domAutomationController.send("FAILURE"); | 45 domAutomationController.send("FAILURE"); |
| 46 return; | 46 return; |
| 47 } | 47 } |
| 48 | 48 |
| 49 gl.viewport(0, 0, 50, 50); |
| 50 |
| 49 waitForFinish(); | 51 waitForFinish(); |
| 50 } | 52 } |
| 51 | 53 |
| 52 function waitForFinish() | 54 function waitForFinish() |
| 53 { | 55 { |
| 54 if (g_swapsBeforeAck == 0) { | 56 if (g_swapsBeforeAck == 0) { |
| 55 domAutomationController.setAutomationId(1); | 57 domAutomationController.setAutomationId(1); |
| 56 domAutomationController.send("SUCCESS"); | 58 domAutomationController.send("SUCCESS"); |
| 57 } else { | 59 } else { |
| 58 g_swapsBeforeAck--; | 60 g_swapsBeforeAck--; |
| 59 document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1; | 61 document.getElementById('container').style.zIndex = g_swapsBeforeAck + 1; |
| 60 drawTriangle(gl); | 62 drawTriangle(gl); |
| 61 window.webkitRequestAnimationFrame(waitForFinish); | 63 window.webkitRequestAnimationFrame(waitForFinish); |
| 62 } | 64 } |
| 63 } | 65 } |
| 64 </script> | 66 </script> |
| 65 </head> | 67 </head> |
| 66 <body onload="main()"> | 68 <body onload="main()"> |
| 67 <div style="position:relative; width:400px; height:400px; background-color:black
"> | 69 <div style="position:relative; width:300px; height:300px; background-color:black
"> |
| 68 </div> | 70 </div> |
| 69 <div id="container" style="position:absolute; top:0px; left:0px"> | 71 <div id="container" style="position:absolute; top:0px; left:0px"> |
| 72 <canvas id="c2" width="50" height="50" class="nomargin"></canvas> |
| 70 <!-- | 73 <!-- |
| 71 Canvas acceleration requires that the canvas be at least 256x257. | 74 Canvas acceleration requires that the canvas be at least 256x257. |
| 72 --> | 75 --> |
| 73 <canvas id="c" width="300" height="300" class="nomargin"></canvas> | 76 <canvas id="c" width="300" height="300" class="nomargin"></canvas> |
| 74 <canvas id="c2" width="300" height="300" class="nomargin"></canvas> | |
| 75 </div> | 77 </div> |
| 76 </body> | 78 </body> |
| 77 </html> | 79 </html> |
| OLD | NEW |