tor-browser

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

preload-with-invalid-as.h2.window.js (569B)


      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 with an invalid `as` attribute should be ignored.");
      8    params.set("resource-url",
      9        SAME_ORIGIN_RESOURCES_URL + "/empty.js?" + token());
     10    params.set("as", "invalid");
     11    params.set("should-preload", false);
     12    const test_url = "resources/preload-as-test.h2.py?" + params.toString();
     13    window.location.replace(new URL(test_url, window.location));
     14 });