summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/repaint/overflow-scroll-in-overflow-scroll-scrolled.html
blob: 73a8d049d905c5b007600dedccb0286253bbb571 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!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: scroll;" id="outerDiv">
    <div style="height: 300px; background: purple;"></div>
    <div style="height: 400px; overflow-y: scroll;" id="innerDiv">
        <div style="height: 400px; width: 300px; background: red"></div>
        <div style="height: 400px; width: 300px; background: green"></div>
    </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>