diff options
Diffstat (limited to 'testing/web-platform/tests/scheduler/post-task-with-abort-signal.any.js')
-rw-r--r-- | testing/web-platform/tests/scheduler/post-task-with-abort-signal.any.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/web-platform/tests/scheduler/post-task-with-abort-signal.any.js b/testing/web-platform/tests/scheduler/post-task-with-abort-signal.any.js new file mode 100644 index 0000000000..41cbafba90 --- /dev/null +++ b/testing/web-platform/tests/scheduler/post-task-with-abort-signal.any.js @@ -0,0 +1,11 @@ +// META: title=Scheduler: postTask and AbortSignal +// META: global=window,worker +'use strict'; + +promise_test(t => { + const controller = new AbortController(); + const signal = controller.signal; + const taskResult = scheduler.postTask(() => {}, {signal}); + controller.abort(); + return promise_rejects_dom(t, 'AbortError', taskResult); +}, 'Test that scheduler.postTask() accepts an AbortSignal that is not also a TaskSignal'); |