Skip to content

Commit 2ebbe32

Browse files
farremoz-wptsync-bot
authored andcommitted
Manually change LOAD_LINK to LOAD_NORMAL_REPLACE.
Differential Revision: https://phabricator.services.mozilla.com/D272864 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1998121 gecko-commit: 744e719a0999da37c503a4746ee754865736b7f3 gecko-reviewers: dom-core, smaug
1 parent e1b28d9 commit 2ebbe32

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!doctype html>
2+
<script src="/resources/testharness.js"></script>
3+
<script src="/resources/testharnessreport.js"></script>
4+
<a id="a" href="/navigation-api/navigate-event/navigate-anchor-same-url.html"></a>
5+
<script>
6+
promise_test(async t => {
7+
await new Promise(resolve => window.addEventListener('load', resolve, {once: true}));
8+
9+
const { promise, resolve } = Promise.withResolvers();
10+
navigation.onnavigate = t.step_func_done(e => {
11+
assert_equals(e.navigationType, "replace");
12+
assert_equals(new URL(e.destination.url).pathname,
13+
"/navigation-api/navigate-event/navigate-anchor-same-url.html");
14+
resolve();
15+
e.intercept({handler: () => {}});
16+
});
17+
a.click();
18+
19+
return promise;
20+
}, "<a> to identical url is a replace navigation");
21+
</script>

0 commit comments

Comments
 (0)