blob: 0b9416e7b343e59fa030b09bacca1a11a39ca514 [file] [log] [blame]
<!doctype html>
<title>Scheduling API: postTask</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>
<iframe id="i" src="support/create_and_pass_signal.html"></iframe>
<script>
'use strict';
var iframe_controller;
function passController(controller) {
iframe_controller = controller;
i.remove();
}
async_test(t => {
window.onload = function() {
setTimeout(() => {
scheduler.postTask(() => {}, { signal: iframe_controller.signal }).then(
() => assert_unreached("Promise should be rejected"),
t.step_func_done());
}, 0);
};
}, 'Test scheduler.postTask() with a signal from a detached iframe');
</script>