| OLD | NEW |
| 1 <!-- Based on fast/images/fixed-img-src-change-after-scroll.html --> |
| 1 <!DOCTYPE html> | 2 <!DOCTYPE html> |
| 2 <script src="../repaint/resources/text-based-repaint.js"></script> | 3 <script src="resources/paint-invalidation-test.js"></script> |
| 3 <script> | 4 <script> |
| 4 function repaintTest() { | 5 window.expectedPaintInvalidationObjects = [ |
| 6 "LayoutImage (positioned) IMG id='img'", |
| 7 ]; |
| 8 function paintInvalidationTest() { |
| 5 window.scrollTo(0, 1000); | 9 window.scrollTo(0, 1000); |
| 6 document.getElementById('img').src = 'resources/green.jpg'; | 10 document.getElementById('img').src = '../../../fast/images/resources/green.jpg
'; |
| 7 } | 11 } |
| 8 onload = runRepaintTest; | 12 onload = runPaintInvalidationTest; |
| 9 </script> | 13 </script> |
| 10 <body style="height: 2000px"> | 14 <body style="height: 2000px"> |
| 11 Checks correct paint invalidation on image src change after a pending scroll. | 15 Checks correct paint invalidation on image src change after a pending scroll. |
| 12 Passes if there is no assert failure about pending scroll offsets in a debug bui
ld | 16 Passes if there is no assert failure about pending scroll offsets in a debug bui
ld |
| 13 (http://crbug.com/434950), and both the old location and new location of the img
are | 17 (http://crbug.com/434950), and both the old location and new location of the img
are |
| 14 correctly invalidated. | 18 correctly invalidated. |
| 15 <img id='img' style="width: 100px; height: 100px; position: fixed; top: 50px;
left: 0"> | 19 <img id='img' style="width: 100px; height: 100px; position: fixed; top: 50px;
left: 0"> |
| 16 </body> | 20 </body> |
| OLD | NEW |