diff options
Diffstat (limited to 'testing/web-platform/tests/html/browsers/sandboxing/sandbox-javascript-window-open.html')
-rw-r--r-- | testing/web-platform/tests/html/browsers/sandboxing/sandbox-javascript-window-open.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/browsers/sandboxing/sandbox-javascript-window-open.html b/testing/web-platform/tests/html/browsers/sandboxing/sandbox-javascript-window-open.html new file mode 100644 index 0000000000..fd21e9bb02 --- /dev/null +++ b/testing/web-platform/tests/html/browsers/sandboxing/sandbox-javascript-window-open.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>window.open in sandbox iframe</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/utils.js"></script> +<body> +<script> +promise_test(async test => { + let message = new Promise(resolve => { + window.addEventListener("message", event => resolve(event.data)); + }); + let iframe = document.createElement("iframe"); + iframe.sandbox = "allow-scripts allow-popups allow-same-origin"; + iframe.src = "./resources/sandbox-javascript-window-open.html"; + document.body.appendChild(iframe); + assert_equals(await message, "disallow-document-domain"); +}); +</script> |