tor-browser

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

xhr-timeout-longtask.any.js (388B)


      1 async_test(function() {
      2  var client = new XMLHttpRequest();
      3  client.open("GET", "resources/delay.py?ms=100", true);
      4 
      5  client.timeout = 150;
      6  client.ontimeout = this.step_func(assert_unreached);
      7  client.onloadend = () => this.done();
      8 
      9  client.send();
     10 
     11  const start = performance.now();
     12  while (performance.now() - start < 200) { }
     13 }, "Long tasks should not trigger load timeout")