tor-browser

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

Worker-location.sub.any.js (821B)


      1 // META: global=dedicatedworker,sharedworker
      2 test(() => {
      3  assert_equals(String(WorkerLocation).replace(/\n/g, " ").replace(/\s\s+/g, " "), "function WorkerLocation() { [native code] }");
      4  assert_true(location instanceof Object);
      5  assert_equals(location.href, 'http://{{host}}:{{ports[http][0]}}/workers/Worker-location.sub.any.worker.js');
      6  assert_equals(location.origin, "http://{{host}}:{{ports[http][0]}}");
      7  assert_equals(location.protocol, "http:");
      8  assert_equals(location.host, "{{host}}:{{ports[http][0]}}");
      9  assert_equals(location.hostname, "{{host}}");
     10  assert_equals(location.port, "{{ports[http][0]}}");
     11  assert_equals(location.pathname, "/workers/Worker-location.sub.any.worker.js");
     12  assert_equals(location.search, "");
     13  assert_equals(location.hash, "");
     14 }, 'Test WorkerLocation properties.');