eval-allowed-by-hash-long-script.sub.html (868B)
1 <!DOCTYPE html> 2 <html> 3 4 <head> 5 <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'eval-sha256-VQy4ev8+SNjwocE4f/UdEfFZK/kEkq7mIM/M/mZrVpE='; 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, long text that exceeds the 40 character limit used for report snippets"]'></script> 11 </head> 12 13 <body> 14 <script> 15 window.addEventListener('securitypolicyviolation', function(e) { 16 log("Fail"); 17 }); 18 19 eval("alert_assert('PASS, long text that exceeds the 40 character limit used for report snippets')"); 20 </script> 21 <div id="log"></div> 22 </body> 23 24 </html>