blob: 525d56f300143fc328d2928de363f970268910ee [file] [log] [blame]
<!doctype html>
<title>Scheduling API: Global Task Queues</title>
<link rel="author" title="Scott Haseley" href="mailto:shaseley@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 => {
var result = "fail";
let tc = new TaskController("background");
scheduler.postTask(() => { result = "pass"; }, { priority : "user-blocking", signal: tc.signal });
// Since the above task should be run at user-blocking priority, it should execute
// before this user-visible priority task.
scheduler.postTask(t.step_func_done(() => {
assert_equals(result, "pass");
}));
}, 'Test when scheduler.postTask() is passed both a signal and a priority');
</script>