4 <p>This test requires DumpRenderTree. To test manually, try to scroll the
5 blue div to the left and the red div up using the scrollbar arrows or the
6 mouse wheel. The test passes if the divs scroll.
</p>
8 <div id='rtl'
style=
"direction: rtl; width: 100px; overflow: auto; border: 1px solid blue;">
12 <div id='bt'
style=
"-webkit-writing-mode: horizontal-bt; height: 100px; overflow: auto; border: 1 px solid red;">
26 <div id=
"console"></div>
31 document
.getElementById("console").innerHTML
+= message
+ "<br>";
34 function centerMouseOn(elementId
)
36 var element
= document
.getElementById(elementId
);
37 eventSender
.mouseMoveTo(element
.offsetLeft
+ element
.offsetWidth
/ 2,
38 element
.offsetTop
+ element
.offsetHeight
/ 2);
43 if (window
.testRunner
)
44 testRunner
.dumpAsText();
46 if (!window
.eventSender
|| !window
.eventSender
.mouseScrollBy
) {
47 log("This test requires DumpRenderTree with eventSender.mouseScrollBy.");
52 var offsetBefore
= document
.getElementById("rtl").scrollLeft
;
53 eventSender
.mouseScrollBy(1, 0);
54 var offsetAfter
= document
.getElementById("rtl").scrollLeft
;
55 if (offsetBefore
> offsetAfter
)
59 log("scrollLeft before: " + offsetBefore
);
60 log("scrollLeft after: " + offsetAfter
);
64 offsetBefore
= document
.getElementById("bt").scrollTop
;
65 eventSender
.mouseScrollBy(0, 1);
66 offsetAfter
= document
.getElementById("bt").scrollTop
;
67 if (offsetBefore
> offsetAfter
)
71 log("scrollTop before: " + offsetBefore
);
72 log("scrollTop after: " + offsetAfter
);
75 document
.body
.removeChild(document
.getElementById("rtl"));
76 document
.body
.removeChild(document
.getElementById("bt"));