summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/repaint/overflow-auto-in-overflow-auto-scrolled.html
blob: ba711ea3eb401a829d9b22a19a1992b95b79b713 (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
40
41
<!DOCTYPE html>
<html>
<head>
    <script src="resources/text-based-repaint.js" type="text/javascript"></script>
    <script>
    window.onload = function() {
        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.");
        }
        runRepaintTest();
    };

    function repaintTest()
    {
        // Now scroll once in the #innerDiv to the green area.
        if (window.eventSender)
            eventSender.mouseScrollBy(0, -10);
    }
    </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">
        <div style="height: 400px; width: 300px; background: red"></div>
        <div style="height: 400px; width: 300px; background: green"></div>
    </div>
</div>
</body>
</html>