tor-browser

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

navigator-globalPrivacyControl.js (514B)


      1 importScripts("/resources/testharness.js");
      2 
      3 const queryString = self.location.search;
      4 const urlParams = new URLSearchParams(queryString);
      5 const expectedValue = urlParams.has("gpc", "true");
      6 const workerType = urlParams.get("workerType");
      7 test(function(t) {
      8  assert_equals(navigator.globalPrivacyControl, expectedValue, "Expected navigator.globalPrivacyControl value is read from the worker");
      9 }, `Expected navigator.globalPrivacyControl value (${expectedValue}) is read from the ${workerType} worker`);
     10 
     11 done();