Chromium Code Reviews| Index: LayoutTests/fast/repaint/scrollbar-damage-and-full-viewport-repaint.html |
| diff --git a/LayoutTests/fast/repaint/scrollbar-damage-and-full-viewport-repaint.html b/LayoutTests/fast/repaint/scrollbar-damage-and-full-viewport-repaint.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2be73f1e050284afae3a60b2204daf8667fe4e11 |
| --- /dev/null |
| +++ b/LayoutTests/fast/repaint/scrollbar-damage-and-full-viewport-repaint.html |
| @@ -0,0 +1,42 @@ |
| +<!DOCTYPE html> |
| +<style> |
| +/* To ensure full viewport repaint when viewport is resized. */ |
| +body { |
| + background-image: linear-gradient(red, blue); |
| + background-attachment: fixed; |
| +} |
| +#container { |
| + width: 200px; |
| + height: 200px; |
| + border: 1px solid black; |
| + overflow: scroll; |
| +} |
| +#child { |
| + width: 100px; |
| + height: 100px; |
| +} |
| +</style> |
| +<script src="resources/text-based-repaint.js" type="text/javascript"></script> |
| +<script> |
| +if (window.testRunner) { |
| + testRunner.useUnfortunateSynchronousResizeMode(); |
| +} |
| +function repaintTest() { |
| + // Invalidation of horizontal scrollbar should be tracked. |
| + document.getElementById('child').style.width = '2000px'; |
| +} |
| +window.onload = function() { |
| + // Trigger a full viewport repaint to test if scrollbar damages are cleared |
| + // even if we shortcut children invalidations. |
| + window.resizeTo(1000, 600); |
| + // Invalidation of vertical scrollbar before the repaint test should not be tracked during repaintTest(). |
| + document.getElementById('child').style.height = '2000px'; |
| + runRepaintTest(); |
| +}; |
| +</script> |
| +<div style="height: 30"> |
| +Passes if the result repaint rects contain the horizontal scrollbar but not the vertical scrollbar. |
| +</div> |
|
Julien - ping for review
2014/08/01 19:05:01
Let's add a description of *what* we are testing.
Xianzhu
2014/08/01 22:07:23
Done.
|
| +<div id="container"> |
| + <div id="child"></div> |
| +</div> |