summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/scheduler/post-task-with-aborted-signal.any.js
blob: 4e5d42c0480944364fb0028c58961860d9e56eca (plain)
1
2
3
4
5
6
7
8
9
10
// META: title=Scheduler: postTask with an Aborted Signal
// META: global=window,worker
'use strict';

promise_test(t => {
  const controller = new TaskController();
  const signal = controller.signal;
  controller.abort();
  return promise_rejects_dom(t, 'AbortError', scheduler.postTask(() => {}, {signal}));
}, 'Posting a task with an aborted signal rejects with an AbortError');