blob: a91e52c2c40b054af019a385a59d687353c5f327 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../../../resources/js-test.js"></script>
<script src="../../../../resources/ui-helper.js"></script>
<style>
img {
position: absolute;
top: 0;
left: 0;
}
</style>
</head>
<body>
<img src="../../resources/green-400x400.png"></img>
<script>
jsTestIsAsync = true;
addEventListener("load", async () => {
let image = document.querySelector("img");
internals.installImageOverlay(image, [
{
topLeft : new DOMPointReadOnly(0, 0),
topRight : new DOMPointReadOnly(1, 0),
bottomRight : new DOMPointReadOnly(1, 0.5),
bottomLeft : new DOMPointReadOnly(0, 0.5),
children: [
{
text : "foo",
topLeft : new DOMPointReadOnly(0, 0),
topRight : new DOMPointReadOnly(1, 0),
bottomRight : new DOMPointReadOnly(1, 0.5),
bottomLeft : new DOMPointReadOnly(0, 0.5),
}
],
}
]);
await UIHelper.longPressAtPoint(200, 100);
selectionRects = await UIHelper.waitForSelectionToAppear();
shouldBe("selectionRects.length", "1");
await UIHelper.activateAt(200, 300);
await UIHelper.waitForDoubleTapDelay();
await UIHelper.waitForSelectionToDisappear();
testPassed("Dismissed selection");
await UIHelper.longPressAtPoint(200, 100);
selectionRects = await UIHelper.waitForSelectionToAppear();
shouldBe("selectionRects.length", "1");
finishJSTest();
});
</script>
</body>
</html>