blob: 1b406c42d367f98e0d993f5e4d66d8b704386697 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
async_test(t => {
window.onload = t.step_func_done(() => {
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");
assert_true(abort_signal.aborted);
assert_true(onabort_called);
assert_true(canceled_in_second_handler);
});
}, "window.stop() signals event.signal inside a navigate event handler");
</script>
|