summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/infrastructure/testdriver/actions/iframe.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/infrastructure/testdriver/actions/iframe.html')
-rw-r--r--testing/web-platform/tests/infrastructure/testdriver/actions/iframe.html35
1 files changed, 35 insertions, 0 deletions
diff --git a/testing/web-platform/tests/infrastructure/testdriver/actions/iframe.html b/testing/web-platform/tests/infrastructure/testdriver/actions/iframe.html
new file mode 100644
index 0000000000..6c64d6f49a
--- /dev/null
+++ b/testing/web-platform/tests/infrastructure/testdriver/actions/iframe.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>TestDriver actions on a document in an iframe</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+
+<iframe src="iframeChild.html"></iframe>
+
+<script>
+setup({single_test: true});
+addEventListener("load", async () => {
+ let input = frames[0].document.getElementsByTagName("input")[0];
+ await new test_driver.Actions()
+ .pointerMove(0, 0, {origin: input})
+ .pointerDown()
+ .pointerUp()
+ .send();
+ await new test_driver.Actions()
+ .setContext(frames[0])
+ .keyDown("P")
+ .keyUp("P")
+ .keyDown("A")
+ .keyUp("A")
+ .keyDown("S")
+ .keyUp("S")
+ .keyDown("S")
+ .keyUp("S")
+ .send();
+ assert_equals(input.value, "PASS");
+ done();
+});
+</script>