| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 <!doctype HTML> | 
|  | 2 <body> | 
|  | 3 <div style="height: 2000px; width: 2000px;"> | 
|  | 4 <img id="targetImage"> | 
|  | 5 </div> | 
|  | 6 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> | 
|  | 7 <script> | 
|  | 8 window.testIsAsync = true; | 
|  | 9 | 
|  | 10 // The image should not show a repaint if offscreen if Slimming Paint is on. | 
|  | 11 // Otherwise it should, during this 200ms waiting period. | 
|  | 12 | 
|  | 13 function myfunc() { | 
|  | 14   testRunner.displayAsyncThen(finishRepaintTest); | 
|  | 15 } | 
|  | 16 | 
|  | 17 function targetImageOnload() { | 
|  | 18   window.scrollTo(0, 1000); // Put the image offscreen. | 
|  | 19   testRunner.displayAsyncThen(function() { | 
|  | 20     setTimeout(myfunc, 400); // The initial red frame of the GIF has a 100ms dur
    ation | 
|  | 21   }); | 
|  | 22 } | 
|  | 23 | 
|  | 24 function repaintTest() { | 
|  | 25   targetImage.onload = targetImageOnload; | 
|  | 26   targetImage.src="../../fast/backgrounds/resources/red-green-animated.gif"; | 
|  | 27 } | 
|  | 28 | 
|  | 29 runRepaintTest(); | 
|  | 30 | 
|  | 31 </script> | 
|  | 32 | 
|  | 33 </script> | 
| OLD | NEW | 
|---|