scrollbar-initial-position.html 1.98 KB
Newer Older
1 2 3 4 5 6
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Bug 39284 test case</title>
        <script>
7 8 9
            if (window.testRunner) {
                testRunner.dumpAsText();
                testRunner.waitUntilDone();
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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
            }
        </script>
        <style type="text/css">
            <!--
            #container {
                display:block;
                border:1px solid black;
                width:100px;
                height:100px;
                overflow:hidden;
                padding:0px;
                background-color:blue;
            }
            #container:hover {
                overflow:auto;
            }
            ::-webkit-scrollbar {
                    width: 20px;
                    height: 20px;
            }
            ::-webkit-scrollbar-button:start:decrement,
            ::-webkit-scrollbar-button:end:increment  {
                height: 0px;
                display: block;
            }

            ::-webkit-scrollbar-track-piece  {
                background-color: black;
            }

            ::-webkit-scrollbar-thumb:vertical {
                background-color: white;
            }
            -->
        </style>
    </head>
    <body style="margin:0px;">
        <div id="container">
            <div style="height:200px; width:50px; background-color:red;">
            </div>
            <div style="height:200px; width:50px; background-color:green;">
            </div>
        </div>
        <script>
            var t = document.getElementById("container");
            t.scrollTop = t.scrollHeight;
            if (window.eventSender) {
                eventSender.mouseMoveTo(50, 50);
                eventSender.mouseMoveTo(250, 250);
                eventSender.mouseMoveTo(50, 50);
            }
61 62
            if (window.testRunner)
                window.testRunner.notifyDone();
63 64 65
        </script>
    </body>
</html>