diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/sandboxing/resources/sandbox-inherited-from-initiator-response-helper.html')
-rw-r--r-- | testing/web-platform/tests/html/browsers/sandboxing/resources/sandbox-inherited-from-initiator-response-helper.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/sandboxing/resources/sandbox-inherited-from-initiator-response-helper.html b/testing/web-platform/tests/html/browsers/sandboxing/resources/sandbox-inherited-from-initiator-response-helper.html new file mode 100644 index 0000000000..29c7f12441 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/sandboxing/resources/sandbox-inherited-from-initiator-response-helper.html @@ -0,0 +1,15 @@ +<script> + const iframe_1_script = encodeURI(` + <script> + try { + document.domain = document.domain; + parent.postMessage("not sandboxed", "*"); + } catch (exception) { + parent.postMessage("sandboxed", "*"); + } + </scr`+`ipt> + `); + + const iframe_1 = parent.document.querySelector("#iframe_1"); + iframe_1.src = `data:text/html,${iframe_1_script}`; +</script> |