61 lines
1.8 KiB
HTML
61 lines
1.8 KiB
HTML
<!-- webkit-test-runner [ useThreadedScrolling=false ] -->
|
|
<!DOCTYPE html>
|
|
<head>
|
|
<style type='text/css'>
|
|
body {
|
|
height: 5000px;
|
|
direction: ltr;
|
|
}
|
|
</style>
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
<script>
|
|
window.jsTestIsAsync = true;
|
|
|
|
var scroller;
|
|
var previousScrollPosition;
|
|
|
|
if (window.internals)
|
|
internals.settings.setUserInterfaceDirectionPolicy('Content');
|
|
|
|
function doTest()
|
|
{
|
|
previousScrollPosition = scroller.scrollTop;
|
|
|
|
debug('ACTION : Drag the outermost frame LTR scrollbar.');
|
|
eventSender.mouseMoveTo(window.innerWidth - 4, 20);
|
|
eventSender.mouseDown();
|
|
eventSender.mouseMoveTo(window.innerWidth - 4, 50);
|
|
eventSender.mouseUp();
|
|
|
|
shouldNotBe("scroller.scrollTop", "0");
|
|
|
|
debug('ACTION : Flip \'dir\' from \'rtl\' to \'ltr\'.');
|
|
document.scrollingElement.scrollTop = 0;
|
|
document.body.style.direction = 'rtl';
|
|
|
|
debug('ACTION : Drag the outermost frame RTL scrollbar.');
|
|
previousScrollPosition = scroller.scrollTop;
|
|
eventSender.mouseMoveTo(4, 20);
|
|
eventSender.mouseDown();
|
|
eventSender.mouseMoveTo(4, 50);
|
|
eventSender.mouseUp();
|
|
|
|
shouldNotBe("scroller.scrollTop", "0");
|
|
testRunner.notifyDone();
|
|
}
|
|
|
|
function startTest()
|
|
{
|
|
if (window.eventSender) {
|
|
testRunner.dumpAsText();
|
|
testRunner.waitUntilDone();
|
|
|
|
scroller = document.scrollingElement;
|
|
setTimeout(doTest, 0);
|
|
}
|
|
}
|
|
</script>
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
</head>
|
|
<body style='min-height: 5000px' onload='startTest();'></body>
|