summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/overflow/rtl-scrollbar-drag-origin.html
blob: 3ab7646de057bb8447aae0c447a5005e209022e4 (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
<!DOCTYPE html>
<style>
#container {
    position: absolute;
    left: 100px;
    top: 0;
    width: 300px;
    height: 200px;
    direction: rtl;
    overflow: scroll;
}

#content {
    width: 1000px;
    height: 1px;
}
</style>
<div id="container">
    <div id="content">
    </div>
</div>
This test verifies scroll position restores correctly when a thumb drag has been cancelled in RTL mode.<br/>
This test is expected to fail on Mac because it doesn't cancel scrolling when mouse cursor is out of a certain range. It is Aura-specific behavior.
<script src="../../resources/js-test.js"></script>
<script>
    var container = document.getElementById("container");
    container.scrollLeft = 350;

    if (window.eventSender) {
        eventSender.dragMode = false;
        eventSender.mouseMoveTo(250, 195);
        eventSender.mouseDown();

        eventSender.mouseMoveTo(100, 195);
        shouldBe("container.scrollLeft" , "0");

        eventSender.mouseMoveTo(100, 700);
        shouldBe("container.scrollLeft" , "350");
    }
</script>