blob: 9b7b58ea3d66c50b3595132ba3ff634cdca40977 [file] [edit]
<!DOCTYPE html>
<html>
<head>
<script src="../../../../resources/js-test-pre.js"></script>
</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>
if (window.testRunner)
window.testRunner.waitUntilDone();
async function runTest() {
if (window.testRunner)
await window.testRunner.setPageScaleFactor(2, 0, 0);
window.scrollTo(100,100);
if (window.testRunner)
testRunner.dumpAsText();
document.getElementById("result").innerText = document.elementFromPoint(125, 25).innerText;
if (window.testRunner)
window.testRunner.notifyDone();
}
</script>
</script>
</body>
</html>