tor-browser

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

setting-members.html (949B)


      1 <!doctype html>
      2 <title>setting members of WorkerLocation</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <div id="log"></div>
      6 <script>
      7 async_test(function() {
      8  var worker = new Worker('setting-members.js');
      9  worker.onmessage = this.step_func(function(e) {
     10    assert_equals(e.data[0], null);
     11    assert_equals(e.data[1], location.href.replace('.html', '.js'), 'href');
     12    assert_equals(e.data[2], location.protocol, 'protocol');
     13    assert_equals(e.data[3], location.host, 'host');
     14    assert_equals(e.data[4], location.hostname, 'hostname');
     15    assert_equals(e.data[5], location.port, 'port');
     16    assert_equals(e.data[6], location.pathname.replace('.html', '.js'), 'pathname');
     17    assert_equals(e.data[7], location.search, 'search');
     18    assert_equals(e.data[8], '', 'hash');
     19    assert_array_equals(e.data[9], [], 'number of exceptions');
     20    this.done();
     21  });
     22 });
     23 </script>