summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/scheduler/post-task-delay.any.js
blob: cf96f6703b4256cb75734714311b8ca3155ca920 (plain)
1
2
3
4
5
6
7
8
9
10
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');