summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/browsing-the-web/scroll-to-fragid/scroll-position-vertical-lr.html
blob: 57d99440e114968e7dcd1b61ebf2d18c7bca987b (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
<!DOCTYPE html>
<html style="writing-mode: vertical-lr;">
<head>
<meta charset="UTF-8">
<title>Fragment Navigation: Scroll to block start position in vertical-lr writing mode</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="test" style="position: absolute; top: 5px; left: 7px; margin: 5px 7px; border-style: solid; border-width: 5px 7px; padding: 5px 7px; height: 5px; width: 7px;"></div>
<div style="width: 200vw;"></div>
<script>
async_test(function (t) {
    on_event(window, 'load', function () {
        t.step(function () {
            window.scrollTo(0, 0);
            location.hash = 'test';
            assert_equals(window.scrollX, 14, 'Scroll to the left border edge of #test');
        });
        t.done();
    });
}, '');
</script>
</body>
</html>