diff options
Diffstat (limited to 'testing/web-platform/tests/content-security-policy/inheritance/javascript-url-open-in-main-window.html')
-rw-r--r-- | testing/web-platform/tests/content-security-policy/inheritance/javascript-url-open-in-main-window.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/web-platform/tests/content-security-policy/inheritance/javascript-url-open-in-main-window.html b/testing/web-platform/tests/content-security-policy/inheritance/javascript-url-open-in-main-window.html new file mode 100644 index 0000000000..2366284fc5 --- /dev/null +++ b/testing/web-platform/tests/content-security-policy/inheritance/javascript-url-open-in-main-window.html @@ -0,0 +1,13 @@ +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + async_test(t => { + window.addEventListener("message", t.step_func_done(e => { + assert_equals(e.data, "img blocked", + "Img should be blocked by CSP img-src 'none'"); + })); + + w = window.open("./support/navigate-self-to-javascript.html"); + t.add_cleanup(w.close); + }, "Executing Javascript URL keeps enforcing previous CSPs of the document."); +</script> |