javascript-url-open-in-main-window.html (505B)
1 <script src="/resources/testharness.js"></script> 2 <script src="/resources/testharnessreport.js"></script> 3 <script> 4 async_test(t => { 5 window.addEventListener("message", t.step_func_done(e => { 6 assert_equals(e.data, "img blocked", 7 "Img should be blocked by CSP img-src 'none'"); 8 })); 9 10 w = window.open("./support/navigate-self-to-javascript.html"); 11 t.add_cleanup(w.close); 12 }, "Executing Javascript URL keeps enforcing previous CSPs of the document."); 13 </script>