summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/sandboxing/resources/execute-postmessage.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/browsers/sandboxing/resources/execute-postmessage.html')
-rw-r--r--testing/web-platform/tests/html/browsers/sandboxing/resources/execute-postmessage.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/sandboxing/resources/execute-postmessage.html b/testing/web-platform/tests/html/browsers/sandboxing/resources/execute-postmessage.html
new file mode 100644
index 0000000000..89bd268f9c
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/sandboxing/resources/execute-postmessage.html
@@ -0,0 +1,5 @@
+<script>
+ // Execute arbitrary code from somewhere else, via postMessage.
+ window.addEventListener("message", event => eval(event.data));
+ window.opener.postMessage("ready", "*");
+</script>