| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsaf
e-inline' http://localhost:8000"> |
| 5 <script src="/resources/testharness.js"></script> |
| 6 <script src="/resources/testharnessreport.js"></script> |
| 7 </head> |
| 8 <body> |
| 9 <script> |
| 10 function generateURL(port) { |
| 11 return 'http://localhost:' + port + '/security/contentSecurityPolicy/r
esources/loaded.js'; |
| 12 } |
| 13 |
| 14 document.write("<scr" + "ipt src='" + generateURL("8000") + "'></scr" +
"ipt>"); |
| 15 |
| 16 async_test(function (t) { |
| 17 document.addEventListener("securitypolicyviolation", t.step_func_done(
e => { assert_equals(e.lineNumber, 18); })); |
| 18 document.write("<scr" + "ipt src='" + generateURL("8001") + "'></scr"
+ "ipt>"); |
| 19 }); |
| 20 |
| 21 </script> |
| 22 </body> |
| 23 </html> |
| OLD | NEW |