tor-browser

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

prefetch.https.html (819B)


      1 <!DOCTYPE html>
      2 <meta name="timeout" content="long">
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script src="/common/get-host-info.sub.js"></script>
      6 <script src="/common/utils.js"></script>
      7 <script src="/common/dispatcher/dispatcher.js"></script>
      8 <script src="../resources/utils.js"></script>
      9 <script src="resources/utils.js"></script>
     10 
     11 <body>
     12 <script>
     13 setup(() => assertSpeculationRulesIsSupported());
     14 
     15 promise_test(async t => {
     16  const {tryToActivate, getNetworkRequestCount} =
     17      await create_prerendered_page(t, {}, {prefetch: true}, {});
     18 
     19  assert_equals(await tryToActivate(), 'activated');
     20  assert_equals(await getNetworkRequestCount(), '1', 'Network request count');
     21 }, "Prerender navigation requests should use prefetched results");
     22 </script>