blob: 94cbdcdc091c1fb6226445e44732fb0153000bd0 [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 new Promise(resolve => setTimeout(resolve, 0));
assert_equals(scheduler.currentTaskSignal.priority, "user-blocking");
t.done();
}, { signal: tc.signal });
}, 'Test that currentTaskSignal works through promise resolution');
</script>