Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /scheduler/task-controller-setPriority-recursive.any.html - WPT Dashboard Interop Dashboard
- /scheduler/task-controller-setPriority-recursive.any.serviceworker.html - WPT Dashboard Interop Dashboard
- /scheduler/task-controller-setPriority-recursive.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /scheduler/task-controller-setPriority-recursive.any.worker.html - WPT Dashboard Interop Dashboard
// META: title=Scheduler: Recursive TaskController.setPriority()
// META: global=window,worker
'use strict';
async_test(t => {
const controller = new TaskController();
controller.signal.onprioritychange = t.step_func_done(() => {
assert_equals(controller.signal.priority, 'background');
assert_throws_dom('NotAllowedError', () => { controller.setPriority('user-blocking'); });
});
controller.setPriority('background');
}, 'Test that TaskController.setPriority() throws an error if called recursively');