tor-browser

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

scripthash-base64url-converts-to-base64.sub.html (1191B)


      1 <!DOCTYPE html>
      2 <html>
      3 
      4 <head>
      5    <meta http-equiv="Content-Security-Policy"
      6    content="script-src 'self'
      7    'sha256-fRoLYKuwZQJxt6FZolBE1MyQUsKFOnlf-uj65N-txt0='
      8    'sha384-vw3Q67p46tF_mKt4v6VDRTLv5Nre_boyQqppYghZpZmuy7po_KT4WSj2PF6VpNiS'
      9    'nonce-EDNnf03nceIOfn39fn3e9h3sdfa'
     10    ">
     11    <title>Test whether hash-src are normalized from base64url to base64.</title>
     12    <script src="/resources/testharness.js"></script>
     13    <script src="/resources/testharnessreport.js"></script>
     14    <script src="/content-security-policy/support/alertAssert.sub.js?alerts=%5B%22PASS%20(1%2F2)%22%2C%22PASS%20(2%2F2)%22%5D"></script>
     15    <script nonce="EDNnf03nceIOfn39fn3e9h3sdfa">
     16        window.addEventListener('securitypolicyviolation', function(e) {
     17            alert_assert("Fail");
     18        });
     19    </script>
     20 
     21    <script>
     22        alert_assert('PASS (1/2)');
     23 
     24    </script>
     25    <script>
     26        alert_assert('PASS (2/2)');
     27 
     28    </script>
     29 </head>
     30 
     31 <body>
     32    <p>
     33        This tests whether hash-src are normalized from base64url
     34        to base64. It passes if no CSP violation is generated, and
     35        the alert_assert() calls are executed.
     36    </p>
     37    <div id="log"></div>
     38 </body>
     39 
     40 </html>