child-src-about-blank-allowed-by-default.sub.html (1095B)
1 <!DOCTYPE html> 2 <html> 3 4 <head> 5 <!-- Programmatically converted from a WebKit Reftest, please forgive resulting idiosyncracies.--> 6 <meta http-equiv="Content-Security-Policy" content="child-src 'none'; object-src 'none'; script-src 'self' 'unsafe-inline'; connect-src 'self';"> 7 <title>child-src-about-blank-allowed-by-default</title> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <p>These frames should not be blocked by Content-Security-Policy. 11 It's pointless to block about:blank iframes because 12 blocking a frame just results in displaying about:blank anyway! 13 </p> 14 <script> 15 var t = async_test("Check that frames load without throwing any violation events"); 16 window.addEventListener("securitypolicyviolation", t.unreached_func("Should not have fired any events")); 17 </script> 18 19 <iframe src="about:blank"></iframe> 20 <object type="text/html" data="about:blank"></object> 21 22 <div id="log"></div> 23 24 <script> 25 t.done(); 26 </script> 27 </body> 28 29 </html>