tor-browser

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

task-controller-setPriority-recursive.any.js (520B)


      1 // META: title=Scheduler: Recursive TaskController.setPriority()
      2 // META: global=window,worker
      3 'use strict';
      4 
      5 async_test(t => {
      6  const controller = new TaskController();
      7  controller.signal.onprioritychange = t.step_func_done(() => {
      8    assert_equals(controller.signal.priority, 'background');
      9    assert_throws_dom('NotAllowedError', () => { controller.setPriority('user-blocking'); });
     10  });
     11  controller.setPriority('background');
     12 }, 'Test that TaskController.setPriority() throws an error if called recursively');