blob: b844be411b0a99be0f4582c3ebd8a387a8086620 [file] [log] [blame]
<!DOCTYPE html>
<title>Bug 9223: Test that an RTL element renders a resizer to its bottom-left corner and dragging this resizer to the left changes its width. To test manually, dragging the resizer of the below element to left, and see this element increases its width.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<body dir="rtl" style="margin: 0px">
<div id="overflow" dir="rtl" style="border: 2px solid black; overflow: auto; width: 400px; height: 400px; resize: both;">
<div style="background-color: red; height: 720px"></div>
<div style="background-color: green; height: 1600px"></div>
async_test(function(t) {
// This test must be async because it needs to wait for WebKit to finish
// re-layouting elements after sending mouse events.
var node = document.getElementById('overflow');
var offsetWidth = node.offsetWidth;
var offsetLeft = node.offsetLeft + 5;
var offsetTop = node.offsetTop + node.offsetHeight - 5;
eventSender.mouseMoveTo(offsetLeft, offsetTop);
eventSender.mouseMoveTo(offsetLeft - 30, offsetTop);
setTimeout(t.step_func_done(function() {
assert_greater_than(node.offsetWidth, offsetWidth);
}), 0);