blob: 1e9ddbd80b0a21a0506c23fb634d4e60978b8bb8 [file] [log] [blame]
<!doctype html>
<title>Scheduling API: Signal inheritance</title>
<link rel="author" title="Nate Chapin" href="mailto:japhet@chromium.org">
<link rel="help" href="https://github.com/WICG/main-thread-scheduling">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
'use strict';
async_test(t => {
let ac = new AbortController()
scheduler.postTask(() => {
scheduler.postTask(() => {}, { signal : scheduler.currentTaskSignal }).then(
() => { assert_unreached('This task should have been aborted'); },
t.step_func_done());
ac.abort();
}, { signal: ac.signal });
}, 'Test that currentTaskSignal wraps and follows an AbortSignal');
</script>