tor-browser

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

prefetch-blocked-by-default.html (659B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4  <script src='/resources/testharness.js'></script>
      5  <script src='/resources/testharnessreport.js'></script>
      6  <script src='/common/utils.js'></script>
      7  <script src='/content-security-policy/support/testharness-helper.js'></script>
      8  <script src='/content-security-policy/support/prefetch-helper.js'></script>
      9  <meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline'">
     10  <script>
     11    promise_test(async t => {
     12      assert_false(await try_to_prefetch("/common/dummy.xml", t));
     13    }, 'Prefetch should fail when restricted by default-src');
     14  </script>
     15 </head>
     16 <body>
     17 </body>
     18 </html>