31 lines
1.1 KiB
HTML
31 lines
1.1 KiB
HTML
<html>
|
|
<head>
|
|
<script>
|
|
if (window.testRunner) {
|
|
testRunner.dumpAsText();
|
|
testRunner.waitUntilDone();
|
|
}
|
|
|
|
function measureBlockPosition() {
|
|
if (document.getElementById("block").offsetTop > document.getElementById("hover").offsetHeight)
|
|
document.getElementById("console").innerHTML = "SUCCESS";
|
|
testRunner.notifyDone();
|
|
}
|
|
|
|
function updateBlock() {
|
|
document.getElementById("block").style.display='block';
|
|
window.setTimeout(measureBlockPosition(),10);
|
|
}
|
|
|
|
function test(){
|
|
var element = document.getElementById('hover');
|
|
if (window.testRunner) {
|
|
eventSender.mouseMoveTo(element.offsetLeft + 5, element.offsetTop + 5);
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="test();">
|
|
<div id="hover"><a onMouseOver="updateBlock()">Hover mouse over text. Blue block should appear below.</a><br><div id="block" style="display:none; position:absolute; background:#4682b4; height:10px; width:20px"></div></div>
|
|
<div id="console">FAILURE</div>
|
|
</body></html> |