Bug 1760181 [wpt PR 33182] - App history API to navigation API rename (2/n), a=testonly
[gecko.git] / testing / web-platform / tests / navigation-api / ordering-and-transition / transition-finished-mark-as-handled.html
blob859e07df139701977ccb9fa4fe7d38de2fff4f2f
1 <!doctype html>
2 <script src="/resources/testharness.js"></script>
3 <script src="/resources/testharnessreport.js"></script>
5 <script>
6 async_test(t => {
7 navigation.addEventListener("navigate", e => {
8 e.transitionWhile(Promise.reject(new Error("oh no!")));
9 });
11 window.onunhandledrejection = t.unreached_func("unhandledrejection must not fire");
13 location.href = "?1";
15 // Make sure to trigger the getter to ensure the promise materializes!
16 navigation.transition.finished;
18 t.step_timeout(() => t.done(), 10);
19 }, "navigation.transition.finished must not trigger unhandled rejections");
20 </script>