summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/infrastructure/channels/test_call.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/infrastructure/channels/test_call.html')
-rw-r--r--testing/web-platform/tests/infrastructure/channels/test_call.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/web-platform/tests/infrastructure/channels/test_call.html b/testing/web-platform/tests/infrastructure/channels/test_call.html
new file mode 100644
index 0000000000..49beaea4ff
--- /dev/null
+++ b/testing/web-platform/tests/infrastructure/channels/test_call.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>call method</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/channel.sub.js"></script>
+
+<script>
+setup({single_test: true})
+onload = async () => {
+ let remote = await new RemoteGlobal();
+
+ let url = `child_script.html?uuid=${remote.uuid}`;
+ win = window.open(url, "_blank", "noopener");
+
+ let result = await remote.call(async (elemId) => {
+ return document.getElementById(elemId).textContent;
+ }, ["test"]);
+ assert_equals(result.trim(), "PASS");
+ done();
+}
+</script>