fune/testing/web-platform/tests/navigation-api/currententrychange-event/navigation-navigate-replace-cross-doc.html
Domenic Denicola ea65c3eb84 Bug 1762480 [wpt PR 33461] - Navigation API: change { replace } to { history }, a=testonly
Automatic update from web-platform-tests
Navigation API: change { replace } to { history }

Follows https://github.com/WICG/navigation-api/pull/219.

Bug: 1183545
Change-Id: I1e962de093ece36c0f4cdebfcf83a53b4910ea16
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3564502
Reviewed-by: Nate Chapin <japhet@chromium.org>
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/main@{#988142}

--

wpt-commits: b905dcaacc78838e9b0a70de4aa7ca9735e2b726
wpt-pr: 33461
2022-04-11 07:45:03 +00:00

12 lines
646 B
HTML

<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe id="i" src="/common/blank.html"></iframe>
<script>
promise_test(async t => {
await new Promise(resolve => window.onload = resolve);
i.contentWindow.navigation.oncurrententrychange = t.unreached_func("currententrychange should not fire for cross-document navigations");
i.contentWindow.navigation.navigate("/common/blank.html?1", { history: "replace" });
await new Promise(resolve => i.onload = resolve);
}, "currententrychange does not fire for cross-document navigation.navigate() with replace");
</script>