blob: 2d17f200f8c9639ac9715cc5922fd6cdd7176ab1 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script>
function repaintTest() {
// Now scroll once in the #innerDiv to the green area.
if (window.eventSender)
eventSender.mouseScrollBy(0, -10);
}
window.addEventListener("load", runRepaintTest, false);
</script>
</head>
<body>
<!-- Bug 71550 - REGRESSION (r93614): Content remains despite parent element being scrolled off page using javascript. -->
<!-- For the test to pass you should not see any RED or PURPLE, only green -->
<div style="height: 300px; overflow-y: auto;" id="outerDiv">
<div style="height: 300px; background: purple;"></div>
<div style="height: 400px; overflow-y: auto;" id="innerDiv">
<table>
<tr><td style="height: 400px; width: 300px; background: red"></td></tr>
<tr><td style="height: 400px; width: 300px; background: green"></td></tr>
</table>
</div>
</div>
<script>
if (window.eventSender) {
testRunner.dumpAsTextWithPixelResults();
if (window.internals)
internals.settings.setScrollAnimatorEnabled(false);
// Scroll the #outerDiv until we reach the #innerDiv.
eventSender.mouseMoveTo(50, 50);
eventSender.mouseScrollBy(0, -8);
} else {
document.write("This test is better run under DumpRenderTree. To manually test it, continuously scroll down on the top-most element. There should be no repaint issue.");
}
</script>
</body>
</html>