OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <style> |
| 3 /* To ensure full viewport repaint when viewport is resized. */ |
| 4 body { |
| 5 background-image: linear-gradient(red, blue); |
| 6 background-attachment: fixed; |
| 7 } |
| 8 #container { |
| 9 width: 200px; |
| 10 height: 200px; |
| 11 border: 1px solid black; |
| 12 overflow: scroll; |
| 13 } |
| 14 #child { |
| 15 width: 100px; |
| 16 height: 100px; |
| 17 } |
| 18 </style> |
| 19 <script src="resources/text-based-repaint.js" type="text/javascript"></script> |
| 20 <script> |
| 21 if (window.testRunner) { |
| 22 testRunner.useUnfortunateSynchronousResizeMode(); |
| 23 } |
| 24 function repaintTest() { |
| 25 // Invalidation of horizontal scrollbar should be tracked. |
| 26 document.getElementById('child').style.width = '2000px'; |
| 27 } |
| 28 window.onload = function() { |
| 29 // Trigger a full viewport repaint to test if scrollbar damages are cleared |
| 30 // even if we shortcut children invalidations. |
| 31 window.resizeTo(1000, 600); |
| 32 // Invalidation of vertical scrollbar before the repaint test should not be
tracked during repaintTest(). |
| 33 document.getElementById('child').style.height = '2000px'; |
| 34 runRepaintTest(); |
| 35 }; |
| 36 </script> |
| 37 <!-- Passes if the result repaint rects contain the horizontal scrollbar but not
the vertical scrollbar. --> |
| 38 <div id="container"> |
| 39 <div id="child"></div> |
| 40 </div> |
OLD | NEW |