blob: 93cd75c2b99865eab0fa40720b3219031975a7f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/helpers.js"></script>
<script>
promise_test(async t => {
const err = new Error("boo!");
const promise = Promise.reject(err);
promise.catch(() => {}); // prevent unhandled rejection testharness.js errors
navigation.onnavigate = e => e.intercept({ handler: () => promise });
const result = navigation.reload();
await assertCommittedFulfillsFinishedRejectsExactly(t, result, navigation.currentEntry, err);
}, "reload() and intercept() with a rejected promise");
</script>
|