<html> | |
<head> | |
<title>Pan Scrolling Test</title> | |
</head> | |
<body> | |
<script> | |
if (testRunner) { | |
testRunner.dumpAsText(); | |
testRunner.waitUntilDone(); | |
} | |
</script> | |
<div id="overflow" style="width:500px; height:300px; overflow:auto; border:2px solid red; padding:10px"> | |
<div style="height:200px; position:relative;"> | |
<div style="height:150px; border:1px blue solid; overflow:auto;"> | |
Panscrolling starting in the blue box should scroll the outer div. | |
</div> | |
Panscrolling outside the blue boxes should scroll the outer div. | |
</div> | |
<div style="height:200px; position:relative;"> | |
<div style="height:150px; border:1px blue solid; overflow:auto;"> | |
Panscrolling starting in the blue box should scroll the outer div. | |
</div> | |
</div> | |
</div> | |
<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=28023">bug 28023</a> This tests that pan scrolling | |
propogates correctly up the DOM tree. On success, our scroll offset should be non-zero.</p> | |
<div id="console"></div> | |
<script> | |
if (eventSender) | |
{ | |
eventSender.mouseMoveTo(50, 50); | |
eventSender.mouseDown(1); | |
eventSender.mouseUp(1); | |
eventSender.mouseMoveTo(50, 200); | |
setTimeout(finished, 500); | |
} | |
function finished() | |
{ | |
if (document.getElementById('overflow').scrollTop) | |
document.getElementById('console').innerHTML = "Success! Div with overflow was scrolled"; | |
else | |
document.getElementById('console').innerHTML = "Fail! Div with overflow was not scrolled"; | |
window.testRunner.notifyDone(); | |
} | |
</script> | |
</body> | |
</html> |