tor-browser

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

preload-without-as.h2.window.js (528B)


      1 // META: script=/common/utils.js
      2 // META: script=resources/early-hints-helpers.sub.js
      3 
      4 test(() => {
      5    const params = new URLSearchParams();
      6    params.set("description",
      7        "An early hints preload without `as` attribute should be ignored.");
      8    params.set("resource-url",
      9        SAME_ORIGIN_RESOURCES_URL + "/empty.js?" + token());
     10    params.set("should-preload", false);
     11    const test_url = "resources/preload-as-test.h2.py?" + params.toString();
     12    window.location.replace(new URL(test_url, window.location));
     13 });