summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/overflow/overflow-rtl-vertical-origin.html
blob: f9d2b794d4640602ec08208ae941312280663842 (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
<body>
    <p>This tests that the scroll origin for boxes with -webkit-writing-mode:vertical-rl; direction:rtl; overflow:scroll is correct.</p>
    <div id="test" style="-webkit-writing-mode:vertical-rl; direction:rtl; overflow:scroll; width: 200px; height: 200px">
        <div style="height: 300px; width: 100px;"></div>
    </div>
    <pre id="console"></pre>
    
    <script>
        function log(msg)
        {
            document.getElementById('console').appendChild(document.createTextNode(msg + "\n"));
        }

        if (window.testRunner)
            testRunner.dumpAsText();

        var t = document.getElementById("test");
        var initialTop = t.scrollTop;
        
        // Scroll as far as you can.
        t.scrollTop = 1000;
        
        var newTop = t.scrollTop
        
        if (initialTop == newTop)
            log("PASS: test.scrollTop is correct.")
        else
            log("FAIL: test.scrollTop is incorrect. It is " + initialTop + " but should be " + newTop + ".");
    </script>
</body>