tor-browser

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

preload-as-test.html (613B)


      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 const params = new URLSearchParams(window.location.search);
      9 const description = params.get("description");
     10 
     11 promise_test(async (t) => {
     12    const resource_url = params.get("resource-url");
     13    const should_preload = params.get("should-preload") === "true";
     14    await fetchScript(resource_url);
     15    assert_equals(isPreloadedByEarlyHints(resource_url), should_preload);
     16 }, description);
     17 </script>
     18 </body>