summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/secure-contexts/support/https-subframe-shared.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/secure-contexts/support/https-subframe-shared.html')
-rw-r--r--testing/web-platform/tests/secure-contexts/support/https-subframe-shared.html32
1 files changed, 32 insertions, 0 deletions
diff --git a/testing/web-platform/tests/secure-contexts/support/https-subframe-shared.html b/testing/web-platform/tests/secure-contexts/support/https-subframe-shared.html
new file mode 100644
index 0000000000..5ae7cde5b0
--- /dev/null
+++ b/testing/web-platform/tests/secure-contexts/support/https-subframe-shared.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<script>
+ try {
+ var w = new SharedWorker("shared-worker-script.js");
+ w.port.onmessage = function(e) {
+ parent.postMessage({ type: "shared", error: false, exception: false,
+ isSecureContext: e.data }, "*");
+ };
+ w.onerror = function(e) {
+ parent.postMessage({ type: "shared", error: true, exception: false },
+ "*");
+ }
+ w.port.start();
+ } catch (e) {
+ parent.postMessage({ type: "shared", exception: true }, "*");
+ }
+
+ try {
+ var w = new SharedWorker("parent-shared-worker-script.js");
+ w.port.onmessage = function(e) {
+ parent.postMessage({ type: "nested", error: false, exception: false,
+ isSecureContext: e.data }, "*");
+ };
+ w.onerror = function(e) {
+ parent.postMessage({ type: "nested", error: true, exception: false },
+ "*");
+ }
+ w.port.start();
+ } catch (e) {
+ parent.postMessage({ type: "nested", exception: true }, "*");
+ }
+</script>