blob: df430fe745848854ec5aa3c35659337d10590884 [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 tc = new TaskController("user-blocking");
scheduler.postTask(async () => {
await fetch("support/dummy.txt");
scheduler.postTask(() => {}, { signal: scheduler.currentTaskSignal }).then(
() => { assert_unreached('This task should have been aborted'); },
t.step_func_done());
tc.abort();
}, { signal: tc.signal });
}, 'Test that currentTaskSignal works through promise resolution');
</script>