blob: fe730263506426f9f50808e8f37054d4d13dd754 [file] [log] [blame]
<html>
<head>
<script src="../../resources/ui-helper.js"></script>
<style>
div {
width: 400px;
height: 400px;
}
</style>
<script>
async function test() {
if (!window.testRunner || !testRunner.runUIScript)
return;
testRunner.dumpAsText();
testRunner.waitUntilDone();
document.body.addEventListener("click", function( event ) {
result.innerHTML = "clicked";
}, false);
let element = document.getElementById("clickme");
let rect = element.getBoundingClientRect();
let x = rect.left + rect.width / 2;
let y = rect.top + rect.height / 2;
await UIHelper.activateAt(x, y);
testRunner.notifyDone();
}
</script>
</head>
<body onload="test()">
<div id=clickme></div>
<pre id=result></pre>
</body>
</html>