Bug 1760181 [wpt PR 33182] - App history API to navigation API rename (2/n), a=testonly
[gecko.git] / testing / web-platform / tests / navigation-api / navigate-event / navigate-anchor-cross-origin.html
blob55ecbe749b72d9912aaf50cc69587995984b4eca
1 <!doctype html>
2 <script src="/resources/testharness.js"></script>
3 <script src="/resources/testharnessreport.js"></script>
4 <a id="a" href="https://does-not-exist/foo.html"></a>
5 <script>
6 async_test(t => {
7 navigation.onnavigate = t.step_func_done(e => {
8 assert_equals(e.navigationType, "push");
9 assert_true(e.cancelable);
10 assert_false(e.canTransition);
11 assert_false(e.userInitiated);
12 assert_false(e.hashChange);
13 assert_equals(e.formData, null);
14 assert_equals(e.destination.url, "https://does-not-exist/foo.html");
15 assert_false(e.destination.sameDocument);
16 assert_equals(e.destination.key, null);
17 assert_equals(e.destination.id, null);
18 assert_equals(e.destination.index, -1);
19 e.preventDefault();
20 });
21 a.click();
22 }, "<a> cross-origin navigate event");
23 </script>