linenumber.tentative.html (513B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <meta http-equiv="content-security-policy" content="script-src 'self' 'nonce-abc'"> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 </head> 9 <body> 10 <script nonce="abc"> 11 setup({ single_test: true}); 12 13 document.addEventListener("securitypolicyviolation", e => { 14 assert_equals(e.lineNumber, 18); 15 done(); 16 }); 17 18 location.href = "javascript: causeViolation()"; 19 </script 20 </body> 21 </html>