blob-url-in-main-window-self-navigate-inherits.sub.html (829B)
1 <!DOCTYPE html> 2 <html> 3 4 <head> 5 <script nonce="abc" src="/resources/testharness.js"></script> 6 <script nonce="abc" src="/resources/testharnessreport.js"></script> 7 </head> 8 9 <!-- This tests that navigating a main window to a local scheme preserves the current CSP. 10 We need to test this in a main window with no parent/opener so we use 11 a link with target=_blank and rel=noopener. --> 12 <body> 13 <script> 14 const a = document.createElement("a") 15 a.href = "support/navigate-self-to-blob.html?csp=script-src%20%27nonce-abc%27&report_id={{$id:uuid()}}"; 16 a.target = "_blank" 17 a.rel = "noopener" 18 a.click() 19 </script> 20 <script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=script-src%20%27nonce-abc%27&reportID={{$id}}'></script> 21 </body> 22 23 </html>