| 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/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 window.internals.advanceImageAnimation(targetImage); |
| 12 requestAnimationFrame(function() { | 12 requestAnimationFrame(function() { |
| 13 finishRepaintTest(); | 13 finishRepaintTest(); |
| 14 }); | 14 }); |
| 15 } | 15 } |
| 16 | 16 |
| 17 function targetImageOnload() { | 17 function targetImageOnload() { |
| 18 window.internals.startTrackingRepaints(document); | 18 window.internals.startTrackingRepaints(document); |
| 19 runRepaintTest(); | 19 runRepaintTest(); |
| 20 } | 20 } |
| 21 | 21 |
| 22 window.onload = function() { | 22 window.onload = function() { |
| 23 targetImage.onload = targetImageOnload; | 23 targetImage.onload = targetImageOnload; |
| 24 targetImage.src="../../fast/backgrounds/resources/red-green-animated.gif"; | 24 targetImage.src="../../fast/backgrounds/resources/red-green-animated.gif"; |
| 25 } | 25 } |
| 26 </script> | 26 </script> |
| OLD | NEW |