fune/testing/web-platform/tests/navigation-api/navigate-event/replaceState-inside-back-handler.html
Nate Chapin b71e0b61f6 Bug 1824816 [wpt PR 39226] - Handle the case where a new navigation happens synchronously inside RenderFrameImpl::CommitSameDocumentNavigation, a=testonly
Automatic update from web-platform-tests
Handle the case where a new navigation happens synchronously inside RenderFrameImpl::CommitSameDocumentNavigation

This is broken after https://chromium-review.googlesource.com/c/chromium/src/+/4300672

Bug: 1427449
Change-Id: Ie6ec0a597eeb45e3a7ae11215fc010d284a997bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4375397
Commit-Queue: Nate Chapin <japhet@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1123066}

--

wpt-commits: 94aec983f166c374178fa6761d462342edc62ddf
wpt-pr: 39226
2023-04-12 11:22:01 +00:00

15 lines
689 B
HTML

<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../navigation-methods/return-value/resources/helpers.js"></script>
<script>
promise_test(async t => {
// Wait for after the load event so that the navigation doesn't get converted
// into a replace navigation.
await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0));
await navigation.navigate("#push").finished;
navigation.onnavigate = () => history.replaceState(null, "", "#");
await assertBothRejectDOM(t, navigation.back(), "AbortError");
}, "replaceState inside a navigate event for navigation.back()");
</script>