eval-allowed-by-hash.sub.html (872B)
1 <!DOCTYPE html> 2 <html> 3 4 <head> 5 <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'eval-sha256-wrhs7MZ7Cmwwzxiy9buBGGkLT/3SLW3Sp8UrVRoCohU=' 'eval-sha256-c5YuHHbdlyO3hSF772XFkVAUv6UDNMrNFOxOE9yWwgY='; connect-src 'self';"> 6 <title>eval-allowed</title> 7 <script src="/resources/testharness.js"></script> 8 <script src="/resources/testharnessreport.js"></script> 9 <script src="../../support/logTest.sub.js?logs=[]"></script> 10 <script src='../../support/alertAssert.sub.js?alerts=["PASS (1 of 2)","PASS (2 of 2)"]'></script> 11 </head> 12 13 <body> 14 <script> 15 window.addEventListener('securitypolicyviolation', function(e) { 16 log("Fail"); 17 }); 18 19 eval("alert_assert('PASS (1 of 2)')"); 20 window.eval("alert_assert('PASS (2 of 2)')"); 21 </script> 22 <div id="log"></div> 23 </body> 24 25 </html>