tor-browser

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

preload-in-flight-when-consumed.html (664B)


      1 <!DOCTYPE html>
      2 <meta charset=utf-8>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script src="early-hints-helpers.sub.js"></script>
      6 <body>
      7 <script>
      8 promise_test(async (t) => {
      9    const params = new URLSearchParams(window.location.search);
     10    const resource_id = params.get("resource-id");
     11    const resource_url = params.get("resource-url");
     12 
     13    const promise = fetchScript(resource_url);
     14    await fetch("resume-delayed-js.h2.py?id=" + resource_id);
     15    await promise;
     16    assert_true(isPreloadedByEarlyHints(resource_url));
     17 }, "Early hints preload is in-flight when consumed.");
     18 </script>
     19 </body>