tor-browser

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

injected-inline-style-allowed.sub.html (1189B)


      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="style-src 'unsafe-inline'; script-src 'self' 'unsafe-inline'; connect-src 'self';">
      7    <title>injected-inline-style-allowed</title>
      8    <script src="/resources/testharness.js"></script>
      9    <script src="/resources/testharnessreport.js"></script>
     10    <script src='../support/logTest.sub.js?logs=["PASS: 2 stylesheets on the page."]'></script>
     11    <script src="../support/alertAssert.sub.js?alerts=[]"></script>
     12 </head>
     13 
     14 <body>
     15    <script>
     16       window.addEventListener('securitypolicyviolation', function(e) {
     17            log("Fail");
     18       });
     19    </script>
     20 
     21    <div id="test1">
     22        FAIL 1/2
     23    </div>
     24 
     25    <div id="test2">
     26        FAIL 2/2
     27    </div>
     28 
     29    <script src="support/inject-style.js"></script>
     30    <script>
     31        if (document.styleSheets.length === 2)
     32            log("PASS: 2 stylesheets on the page.");
     33        else
     34            log("FAIL: " + document.styleSheets.length + " stylesheets on the page (should be 2).");
     35 
     36    </script>
     37    <div id="log"></div>
     38 </body>
     39 
     40 </html>