<!DOCTYPE html>
<html>
<head>
</head>
<body onload="runTest();" style="width:2000px;height:2000px;margin:0px;padding:100px">
<button style="width:50px;height:50px;">B1</button><button style="width:50px;height:50px;">B2</button><button style="width:50px;height:50px;">B3</button>
<div>This test is successful if elementFromPoint returns the correct element.</div>
<div id="result"></div>
<script>
function runTest() {
// Scroll before scaling so we scroll the layout viewport rather than the visual.
window.scrollTo(100,100);
if (window.internals)
internals.setPageScaleFactor(2);
if (window.testRunner)
testRunner.dumpAsText();
document.getElementById("result").innerText = document.elementFromPoint(125, 25).innerText;
}
</script>
</script>
</body>
</html>