Bug 1757847 [wpt PR 33036] - Update wpt metadata, a=testonly
[gecko.git] / testing / web-platform / tests / app-history / navigate-event / transitionWhile-cross-origin.html
blobece79d263571838352ab74244df296a798708629
1 <!doctype html>
2 <script src="/resources/testharness.js"></script>
3 <script src="/resources/testharnessreport.js"></script>
4 <script src="/common/get-host-info.sub.js"></script>
5 <script>
6 async_test(t => {
7 navigation.onnavigate = t.step_func_done(e => {
8 assert_true(e.cancelable);
9 assert_false(e.canTransition);
10 assert_false(e.userInitiated);
11 assert_false(e.hashChange);
12 assert_throws_dom("SecurityError", () => e.transitionWhile(Promise.resolve()));
13 e.preventDefault();
14 });
16 window.onload = t.step_func(() => location.href = get_host_info().HTTPS_REMOTE_ORIGIN);
17 }, "AppHistoryNavigateEvent's transitionWhile() should throw if called for a cross origin navigation");
18 </script>