36 lines
1.0 KiB
HTML
36 lines
1.0 KiB
HTML
<div id="target" style="overflow: auto; height: 200px; width: 200px;">
|
|
<div onmouseover="mouseOver(event)" style="margin: 300px 0; width: 100px; height: 100px; background-color: blue;"></div>
|
|
</div>
|
|
<div id="result">Test did not run</div>
|
|
<script>
|
|
var passed = false;
|
|
|
|
function mouseOver(event)
|
|
{
|
|
passed = true;
|
|
clearTimeout(timeoutID);
|
|
finish();
|
|
}
|
|
|
|
function finish()
|
|
{
|
|
document.getElementById("result").innerText = passed ? "PASS" : "FAIL";
|
|
testRunner.notifyDone();
|
|
}
|
|
|
|
if (window.testRunner) {
|
|
testRunner.dumpAsText();
|
|
testRunner.waitUntilDone();
|
|
|
|
// WebKit schedules a fake mouse move event as part of installing the WebView in
|
|
// a window. For the test to be valid, it must begin only after that event
|
|
// gets dispatched.
|
|
setTimeout(function()
|
|
{
|
|
eventSender.mouseMoveTo(50, 100);
|
|
document.getElementById("target").scrollTop = 250;
|
|
timeoutID = setTimeout(finish, 20000);
|
|
}, 200);
|
|
}
|
|
</script>
|