| 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 <img id="targetImage"> | 4 <img id="targetImage"> |
| 5 </div> | 5 </div> |
| 6 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> | 6 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
| 7 <script> | 7 <script> |
| 8 window.testIsAsync = true; | 8 window.testIsAsync = true; |
| 9 | 9 |
| 10 function repaintTest() { | 10 function repaintTest() { |
| 11 window.internals.advanceImageAnimation(targetImage); | 11 if (window.internals) |
| 12 internals.advanceImageAnimation(targetImage); |
| 12 requestAnimationFrame(function() { | 13 requestAnimationFrame(function() { |
| 13 finishRepaintTest(); | 14 finishRepaintTest(); |
| 14 }); | 15 }); |
| 15 } | 16 } |
| 16 | 17 |
| 17 function targetImageOnload() { | |
| 18 window.internals.startTrackingRepaints(document); | |
| 19 runRepaintTest(); | |
| 20 } | |
| 21 | |
| 22 window.onload = function() { | 18 window.onload = function() { |
| 23 targetImage.onload = targetImageOnload; | 19 targetImage.onload = runRepaintTest; |
| 24 targetImage.src="../../fast/backgrounds/resources/red-green-animated.gif"; | 20 targetImage.src="../../fast/backgrounds/resources/red-green-animated.gif"; |
| 25 } | 21 } |
| 26 </script> | 22 </script> |
| OLD | NEW |