tor-browser

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

cleartimeout-clearinterval.any.js (516B)


      1 async_test((t) => {
      2  const handle = setTimeout(
      3    t.step_func(() => {
      4      assert_unreached("Timeout was not canceled");
      5    }),
      6    0
      7  );
      8 
      9  clearInterval(handle);
     10 
     11  setTimeout(() => {
     12    t.done();
     13  }, 100);
     14 }, "Clear timeout with clearInterval");
     15 
     16 async_test((t) => {
     17  const handle = setInterval(
     18    t.step_func(() => {
     19      assert_unreached("Interval was not canceled");
     20    }),
     21    0
     22  );
     23 
     24  clearTimeout(handle);
     25 
     26  setTimeout(() => {
     27    t.done();
     28  }, 100);
     29 }, "Clear interval with clearTimeout");