script-src-strict_dynamic_worker-importScripts.https.html (665B)
1 <!DOCTYPE html> 2 <script src='/resources/testharness.js'></script> 3 <script src='/resources/testharnessreport.js'></script> 4 <script src='../support/testharness-helper.js'></script> 5 6 <meta http-equiv="content-security-policy" content="script-src 'nonce-abc' 'strict-dynamic'"> 7 8 <script nonce="abc"> 9 async_test(t => { 10 assert_no_csp_event_for_url(t, "../support/import-scripts.js"); 11 var w = new Worker("../support/import-scripts.js"); 12 assert_no_event(t, w, "error"); 13 waitUntilEvent(w, "message") 14 .then(t.step_func_done(e => { 15 assert_true(e.data.executed); 16 })); 17 }, "`importScripts(...)` is allowed by 'strict-dynamic'"); 18 </script>