| OLD | NEW |
| 1 <!doctype HTML> | 1 <!doctype HTML> |
| 2 <body> | 2 <body> |
| 3 <div style="height: 2000px; width: 2000px;"> | 3 <div style="height: 2000px; width: 2000px;"> |
| 4 <div id="targetImage" style="width: 50px; height: 50px"></div> | 4 <div id="targetImage" style="width: 50px; height: 50px"></div> |
| 5 <img id="testTarget" style="visibility: hidden"> | 5 <img id="testTarget" style="visibility: hidden"> |
| 6 </div> | 6 </div> |
| 7 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> | 7 <script src="resources/text-based-repaint.js"></script> |
| 8 <script> | 8 <script> |
| 9 window.testIsAsync = true; | 9 window.testIsAsync = true; |
| 10 | 10 |
| 11 function repaintTest() { | 11 function repaintTest() { |
| 12 if (window.internals) | 12 if (window.internals) |
| 13 internals.advanceImageAnimation(testTarget); | 13 internals.advanceImageAnimation(testTarget); |
| 14 requestAnimationFrame(function() { | 14 requestAnimationFrame(function() { |
| 15 finishRepaintTest(); | 15 finishRepaintTest(); |
| 16 }); | 16 }); |
| 17 } | 17 } |
| 18 | 18 |
| 19 onload = function() { | 19 onload = function() { |
| 20 targetImage.style.background = "url(../../fast/backgrounds/resources/red-gre
en-animated.gif)"; | 20 targetImage.style.background = "url(../../fast/backgrounds/resources/red-gre
en-animated.gif)"; |
| 21 | 21 |
| 22 // Use a parallel image element has a hack to detect whether the image has l
oaded, and therefore | 22 // Use a parallel image element has a hack to detect whether the image has l
oaded, and therefore |
| 23 // we'll get a frame. | 23 // we'll get a frame. |
| 24 testTarget.onload = runRepaintTest; | 24 testTarget.onload = runRepaintTest; |
| 25 testTarget.src = "../../fast/backgrounds/resources/red-green-animated.gif"; | 25 testTarget.src = "../../fast/backgrounds/resources/red-green-animated.gif"; |
| 26 } | 26 } |
| 27 </script> | 27 </script> |
| OLD | NEW |