summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/speculation-rules/prerender/resources/cross-origin-isolated.https.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/speculation-rules/prerender/resources/cross-origin-isolated.https.html')
-rw-r--r--testing/web-platform/tests/speculation-rules/prerender/resources/cross-origin-isolated.https.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/testing/web-platform/tests/speculation-rules/prerender/resources/cross-origin-isolated.https.html b/testing/web-platform/tests/speculation-rules/prerender/resources/cross-origin-isolated.https.html
new file mode 100644
index 0000000000..4fdc6c9541
--- /dev/null
+++ b/testing/web-platform/tests/speculation-rules/prerender/resources/cross-origin-isolated.https.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="utils.js"></script>
+<body>
+<script>
+window.onmessage = function(e) {
+ assert_equals(e.data.name, 'crossOriginIsolated');
+ assert_true(e.data.value);
+
+ const testChannel = new PrerenderChannel('test-channel');
+ testChannel.postMessage(self.crossOriginIsolated);
+ testChannel.close();
+};
+
+assert_true(document.prerendering);
+const frame = document.createElement('iframe');
+frame.src = './cross-origin-isolated-iframe.https.html';
+document.body.append(frame);
+</script>
+</body> \ No newline at end of file