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-success.any.html - WPT Dashboard Interop Dashboard
- /scheduler/post-task-result-success.any.serviceworker.html - WPT Dashboard Interop Dashboard
- /scheduler/post-task-result-success.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /scheduler/post-task-result-success.any.worker.html - WPT Dashboard Interop Dashboard
// META: title=Scheduler: postTask Promise Value
// META: global=window,worker
'use strict';
promise_test(async t => {
const result = await scheduler.postTask(() => 1234);
assert_equals(result, 1234);
}, 'Test the task promise is resolved with the callback return value');