6 document
.getElementById('console').appendChild(document
.createTextNode(msg
+ '\n'));
11 if (window
.testRunner
) {
12 testRunner
.waitUntilDone();
13 testRunner
.dumpAsText();
16 var textInDiv
= document
.getElementById('textInDiv');
17 if (window
.eventSender
) {
18 var x
= textInDiv
.offsetLeft
+ 17;
19 var y
= textInDiv
.offsetTop
+ 7;
20 eventSender
.dragMode
= false;
21 eventSender
.mouseMoveTo(x
, y
);
22 eventSender
.mouseDown();
23 eventSender
.mouseMoveTo(x
, y
+ 20);
24 eventSender
.mouseMoveTo(x
, y
+ 220);
26 setTimeout(autoscrollTestPart2
, 100);
29 function autoscrollTestPart2()
31 if (window
.eventSender
)
32 eventSender
.mouseUp();
33 var sd
= document
.getElementById('nonScrollableDiv');
34 if (sd
.scrollTop
== 0)
35 log("PASSED : the autoscroll did not happen!");
37 log("FAILED : the autoscroll has happened :-(");
39 if (window
.testRunner
)
40 testRunner
.notifyDone();
44 <body onload=
"test()">
45 <div id=
"description">Test ensure overflow:hidden has the same effect that overflow-y:hidden has with respect to autoscroll.
<br>
46 To test manually, text select by draggin the text below, and move the mouse downwards out of the div boundary. It should not scroll!
48 <div id=
"nonScrollableDiv" style=
"height: 100px; overflow-x: auto; overflow-y: hidden; width: 100px">
49 <div id=
"tailDiv" style=
" height: 1000px; background-color: yellow">
50 <span id='textInDiv'
> Try to autoscroll this text.
<br>
53 <div id=
"console"></div>