Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /scheduler/post-task-with-aborted-signal.any.html - WPT Dashboard Interop Dashboard
- /scheduler/post-task-with-aborted-signal.any.serviceworker.html - WPT Dashboard Interop Dashboard
- /scheduler/post-task-with-aborted-signal.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /scheduler/post-task-with-aborted-signal.any.worker.html - WPT Dashboard Interop Dashboard
// META: title=Scheduler: postTask with an Aborted Signal
// META: global=window,worker
'use strict';
promise_test(t => {
const controller = new TaskController();
const signal = controller.signal;
controller.abort();
return promise_rejects_dom(t, 'AbortError', scheduler.postTask(() => {}, {signal}));
}, 'Posting a task with an aborted signal rejects with an AbortError');