Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
async_test(t => {
window.onload = t.step_func(() => {
let abort_signal;
let onabort_called = false;
let canceled_in_second_handler = false;
navigation.addEventListener("navigate", t.step_func(e => {
abort_signal = e.signal;
abort_signal.onabort = () => onabort_called = true;
window.stop();
}));
navigation.addEventListener("navigate", t.step_func(e => {
canceled_in_second_handler = e.defaultPrevented;
}));
navigation.navigate("?1").committed.catch((error) => {
assert_true(abort_signal.aborted);
assert_true(onabort_called);
assert_true(canceled_in_second_handler);
t.done();
});
});
}, "window.stop() signals event.signal inside a navigate event handler");
</script>