default-src-inline-allowed.sub.html (954B)
1 <!DOCTYPE html> 2 <html> 3 4 <head> 5 <!-- Programmatically converted from a WebKit Reftest, please forgive resulting idiosyncracies.--> 6 <script> 7 window.addEventListener('securitypolicyviolation', function(e) { 8 log("FAIL"); 9 }); 10 </script> 11 <meta http-equiv="Content-Security-Policy" content="default-src 'self' about: 'unsafe-inline'; connect-src 'self';"> 12 <title>default-src-inline-allowed</title> 13 <script src="/resources/testharness.js"></script> 14 <script src="/resources/testharnessreport.js"></script> 15 <script src="../support/logTest.sub.js?logs=[]"></script> 16 <script src='../support/alertAssert.sub.js?alerts=["PASS 1 of 2","PASS 2 of 2"]'></script> 17 </head> 18 19 <body onload="alert_assert('PASS 2 of 2')"> 20 <script> 21 alert_assert('PASS 1 of 2'); 22 23 </script> 24 <!--iframe src="javascript:alert_assert('Fail')"></iframe--> 25 <div id="log"></div> 26 </body> 27 28 </html>