tor-browser

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

fetch-topics-insecure-context.tentative.http.html (664B)


      1 <!doctype html>
      2 <body>
      3  <script src=/resources/testharness.js></script>
      4  <script src=/resources/testharnessreport.js></script>
      5  <script>
      6    promise_test(async t => {
      7      try {
      8        let response = await fetch('./resources/check-topics-request-header.py', {browsingTopics: true});
      9      } catch (e) {
     10        assert_equals(e.name, 'TypeError');
     11        assert_equals(e.message, 'Failed to execute \'fetch\' on \'Window\': browsingTopics: Topics operations are only available in secure contexts.');
     12        return;
     13      }
     14      assert_unreached("did not reject");
     15    }, 'test fetch(<url>, {browsingTopics: true}) in insecure context');
     16  </script>
     17 </body>