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-result-throws.any.html - WPT Dashboard Interop Dashboard
- /scheduler/post-task-result-throws.any.serviceworker.html - WPT Dashboard Interop Dashboard
- /scheduler/post-task-result-throws.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /scheduler/post-task-result-throws.any.worker.html - WPT Dashboard Interop Dashboard
// META: title=Scheduler: postTask Error Propagation
// META: global=window,worker
'use strict';
promise_test(t => {
const testError = new Error('Failed');
const task = scheduler.postTask(() => { throw testError; });
return promise_rejects_exactly(t, testError, task, 'postTask should propagate the error');
}, 'Test postTask rejects the associated promise with the callback error');