Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /scheduler/post-task-delay.any.html - WPT Dashboard Interop Dashboard
- /scheduler/post-task-delay.any.serviceworker.html - WPT Dashboard Interop Dashboard
- /scheduler/post-task-delay.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /scheduler/post-task-delay.any.worker.html - WPT Dashboard Interop Dashboard
// META: title=Scheduler: postTask Delayed Tasks
// META: global=window,worker
'use strict';
promise_test(async t => {
const start = performance.now();
return scheduler.postTask(() => {
const elapsed = performance.now() - start;
assert_greater_than_equal(elapsed, 10);
}, {priority: 'user-blocking', delay: 10});
}, 'Tests basic scheduler.postTask with a delay');