blob: 0309f596cfc9f20d37e94538dc237c9785c5e8c9 [file] [log] [blame]
<html>
<head>
<title>Pan Scrolling Test</title>
</head>
<body>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
</script>
<div id="overflow" style="width:500px; height:150px; overflow:auto; border:2px solid red; padding:10px">
<map name="navMap">
<area shape=rect coords="0,0,100,50" href="">
</map>
<img border="2" width="100" height="100" usemap="#navmap" ismap>
<h1>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=32613">bug 32613</a> This tests that middle
clicking on the part of an image map that doesn't have a link will scroll.</h1>
</div>
<p>
<div id="console"></div>
<script>
if (window.eventSender)
{
// 50, 100 is not inside the area part of the map with the href (but is in the image map).
eventSender.mouseMoveTo(50, 100);
eventSender.mouseDown(1);
eventSender.mouseMoveTo(50, 200);
setTimeout(finished, 500);
}
function finished()
{
eventSender.mouseUp(1);
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>