diff options
Diffstat (limited to 'testing/web-platform/tests/scheduler/post-task-delay.any.js')
-rw-r--r-- | testing/web-platform/tests/scheduler/post-task-delay.any.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/web-platform/tests/scheduler/post-task-delay.any.js b/testing/web-platform/tests/scheduler/post-task-delay.any.js new file mode 100644 index 0000000000..cf96f6703b --- /dev/null +++ b/testing/web-platform/tests/scheduler/post-task-delay.any.js @@ -0,0 +1,11 @@ +// 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'); |