link-preload-from-header-report-only-nonce.sub.html (660B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>A Report-Only policy with a nonce does not send a report for an allowed link preload</title> 5 <script nonce="abc" src="/resources/testharness.js"></script> 6 <script nonce="abc" src="/resources/testharnessreport.js"></script> 7 </head> 8 <body> 9 <script nonce="abc"> 10 var testName = "Report should not be sent for an allowed link preload"; 11 addEventListener("load", () => { 12 const script = document.createElement("script"); 13 script.nonce = "abc"; 14 script.src = `../support/checkReport.sub.js?reportExists=false&testName=${encodeURIComponent(testName)}`; 15 16 document.body.appendChild(script); 17 }); 18 </script> 19 </body> 20 </html>