blob: 9a4edc8904aa17b88785b2787c44a73917173676 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../../../resources/js-test.js"></script>
<style>
img {
position: absolute;
top: 0;
left: 0;
}
</style>
</head>
<body>
<a href="http://localhost:54321">
<img src="../../resources/green-400x400.png"></img>
</a>
<script>
addEventListener("load", () => {
let image = document.querySelector("img");
internals.installImageOverlay(image, [
{
topLeft : new DOMPointReadOnly(0, 0.5),
topRight : new DOMPointReadOnly(1, 0.5),
bottomRight : new DOMPointReadOnly(1, 1),
bottomLeft : new DOMPointReadOnly(0, 1),
children: [
{
text : "hello",
topLeft : new DOMPointReadOnly(0, 0.5),
topRight : new DOMPointReadOnly(1, 0.5),
bottomRight : new DOMPointReadOnly(1, 1),
bottomLeft : new DOMPointReadOnly(0, 1),
}
]
}
]);
image.addEventListener("click", event => {
testFailed("Observed click.");
});
eventSender.mouseMoveTo(50, 300);
eventSender.mouseDown();
eventSender.mouseMoveTo(350, 300);
eventSender.mouseUp();
});
</script>
</body>
</html>