summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/windows/post-message/resources/third-party-to-third-party-cross-partition-same-origin-iframe-a.sub.https.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/browsers/windows/post-message/resources/third-party-to-third-party-cross-partition-same-origin-iframe-a.sub.https.html')
-rw-r--r--testing/web-platform/tests/html/browsers/windows/post-message/resources/third-party-to-third-party-cross-partition-same-origin-iframe-a.sub.https.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/windows/post-message/resources/third-party-to-third-party-cross-partition-same-origin-iframe-a.sub.https.html b/testing/web-platform/tests/html/browsers/windows/post-message/resources/third-party-to-third-party-cross-partition-same-origin-iframe-a.sub.https.html
new file mode 100644
index 0000000000..ec551bfdec
--- /dev/null
+++ b/testing/web-platform/tests/html/browsers/windows/post-message/resources/third-party-to-third-party-cross-partition-same-origin-iframe-a.sub.https.html
@@ -0,0 +1,17 @@
+<!doctype html>
+<meta charset=utf-8>
+<body>
+<script>
+// Step 5 (html/browsers/windows/post-message/third-party-to-third-party-cross-partition-same-origin.sub.html)
+let site3Window;
+const listener = e => {
+ if (e.data === "Site 2 Frame B") {
+ site3Window.close();
+ window.top.postMessage("Site 2 Frame A", "*");
+ }
+};
+// Step 2 (html/browsers/windows/post-message/third-party-to-third-party-cross-partition-same-origin.sub.html)
+window.addEventListener("message", listener);
+site3Window = window.open("https://{{host}}:{{ports[https][0]}}/html/browsers/windows/post-message/resources/third-party-to-third-party-cross-partition-same-origin-window.sub.https.html", "", "noopener=false");
+</script>
+</body>