blob: b2a900e3298fd30bb526f81b5073788f7c278f8b [file] [log] [blame]
<!DOCTYPE html>
function log(msg)
document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
function test()
if (window.testRunner) {
var textInDiv = document.getElementById('textInDiv');
if (window.eventSender) {
var x = textInDiv.offsetLeft + 17;
var y = textInDiv.offsetTop + 7;
eventSender.dragMode = false;
eventSender.mouseMoveTo(x, y);
eventSender.mouseMoveTo(x, y + 20);
eventSender.mouseMoveTo(x, y + 220);
setTimeout(autoscrollTestPart2, 100);
function autoscrollTestPart2()
if (window.eventSender)
var sd = document.getElementById('nonScrollableDiv');
if (sd.scrollTop == 0)
log("PASSED : the autoscroll did not happen!");
log("FAILED : the autoscroll has happened :-(");
if (window.testRunner)
<body onload="test()">
<div id="description">Test ensure overflow:hidden has the same effect that overflow-y:hidden has with respect to autoscroll.<br>
To test manually, text select by draggin the text below, and move the mouse downwards out of the div boundary. It should not scroll!
<div id="nonScrollableDiv" style="height: 100px; overflow-x: auto; overflow-y: hidden; width: 100px">
<div id="tailDiv" style=" height: 1000px; background-color: yellow">
<span id='textInDiv'> Try to autoscroll this text.<br>
<div id="console"></div>