| 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"> | 4 <div id="targetImage" style="width: 50px; height: 50px"> |
| 5 </div> | 5 </div> |
| 6 <img id="testTarget" style="visibility: hidden"> | 6 <img id="testTarget" style="visibility: hidden"> |
| 7 | 7 |
| 8 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> | 8 <script src="../../fast/repaint/resources/repaint.js"></script> |
| 9 <script> | 9 <script> |
| 10 window.testIsAsync = true; | 10 window.testIsAsync = true; |
| 11 | 11 |
| 12 // The image should not show a paint invalidation if offscreen if Slimming Paint
is on. | 12 // The image should not show a paint invalidation if offscreen if Slimming Paint
is on. |
| 13 // Otherwise it should. | 13 // Otherwise it should. |
| 14 | 14 |
| 15 // Steps: | 15 // Steps: |
| 16 // 1. Load the image | 16 // 1. Load the image |
| 17 // 2. Move the image offscreen | 17 // 2. Move the image offscreen |
| 18 // 3. Start tracking paint invalidation rects | 18 // 3. Start tracking paint invalidation rects |
| (...skipping 20 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 window.onload = function() { | 40 window.onload = function() { |
| 41 targetImage.style.background = "url(../../fast/backgrounds/resources/red-gre
en-animated.gif)"; | 41 targetImage.style.background = "url(../../fast/backgrounds/resources/red-gre
en-animated.gif)"; |
| 42 | 42 |
| 43 // Use a parallel image element as a hack to detect whether the image has lo
aded, and therefore | 43 // Use a parallel image element as a hack to detect whether the image has lo
aded, and therefore |
| 44 // we'll get a frame. | 44 // we'll get a frame. |
| 45 testTarget.onload = targetImageOnload; | 45 testTarget.onload = targetImageOnload; |
| 46 testTarget.src = "../../fast/backgrounds/resources/red-green-animated.gif"; | 46 testTarget.src = "../../fast/backgrounds/resources/red-green-animated.gif"; |
| 47 } | 47 } |
| 48 </script> | 48 </script> |
| OLD | NEW |