blob: 8f17426b83596e5a4ee87a2845e2e4485ff51116 [file] [log] [blame]
<!DOCTYPE html>
#container {
position: absolute;
left: 100px;
top: 0;
width: 300px;
height: 200px;
direction: rtl;
overflow: scroll;
#content {
width: 1000px;
height: 1px;
<div id="container">
<div id="content">
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 and Linux because those platforms don't cancel scrolling when mouse cursor is out of a certain range. It is Windows-specific behavior.
<script src="../../resources/js-test.js"></script>
var container = document.getElementById("container");
container.scrollLeft = 350;
if (window.eventSender) {
eventSender.dragMode = false;
eventSender.mouseMoveTo(250, 195);
eventSender.mouseMoveTo(100, 195);
shouldBe("container.scrollLeft" , "0");
eventSender.mouseMoveTo(100, 700);
shouldBe("container.scrollLeft" , "350");