post-task-with-abort-signal.any.js (429B)
1 // META: title=Scheduler: postTask and AbortSignal 2 // META: global=window,worker 3 'use strict'; 4 5 promise_test(t => { 6 const controller = new AbortController(); 7 const signal = controller.signal; 8 const taskResult = scheduler.postTask(() => {}, {signal}); 9 controller.abort(); 10 return promise_rejects_dom(t, 'AbortError', taskResult); 11 }, 'Test that scheduler.postTask() accepts an AbortSignal that is not also a TaskSignal');