tor-browser

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

stylehash-default-src.sub.html (897B)


      1 <!DOCTYPE html>
      2 <html>
      3    <head>
      4    <title>stylehash allowed from default-src</title>
      5    <meta http-equiv="Content-Security-Policy" content="default-src 'self' 'sha256-SXMrww9+PS7ymkxYbv91id+HfXeO7p1uCY0xhNb4MIw='; script-src 'self' 'unsafe-inline'; connect-src 'self';">
      6    <script src="/resources/testharness.js"></script>
      7    <script src="/resources/testharnessreport.js"></script>
      8    <script>
      9        setup({ single_test: true });
     10        window.addEventListener('securitypolicyviolation', function(e) {
     11            assert_unreached("securitypolicyviolat was fired");
     12        });
     13    </script>
     14    </head>
     15 
     16    <body>
     17    <p id="p">Test</p>
     18    <style>p#p { color: green; }</style>
     19    <script>
     20    var color = window.getComputedStyle(document.querySelector('#p')).color;
     21    assert_equals(color, "rgb(0, 128, 0)");
     22    done();
     23    </script>
     24 
     25    <div id="log"></div>
     26    </body>
     27 </html>