tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

frame-src-about-blank-allowed-by-default.sub.html (1137B)


      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="frame-src 'none'; object-src 'none'; script-src 'self' 'unsafe-inline'; connect-src 'self';">
      7    <title>frame-src-about-blank-allowed-by-default</title>
      8    <script src="/resources/testharness.js"></script>
      9    <script src="/resources/testharnessreport.js"></script>
     10    <script src='../support/logTest.sub.js?logs=["PASS"]'></script>
     11    <script src="../support/alertAssert.sub.js?alerts=[]"></script>
     12 
     13    <p>These frames should not be blocked by Content-Security-Policy.
     14        It&apos;s pointless to block about:blank iframes because
     15        blocking a frame just results in displaying about:blank anyway!
     16    </p>
     17    <script>
     18        window.addEventListener('securitypolicyviolation', function(e) {
     19            log("Fail");
     20        });
     21    </script>
     22 
     23    <iframe src="about:blank"></iframe>
     24    <object type="text/html" data="about:blank"></object>
     25 
     26    <div id="log"></div>
     27    <script>
     28        log("PASS");
     29    </script>
     30 </body>
     31 
     32 </html>