tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit d4c08752a927b0f23b551f36f0e97cad36d302c4
parent 894daf4bf03c9efa62cb36fe7a5a38cec9dcba00
Author: Noam Rosenthal <nrosenthal@chromium.org>
Date:   Fri,  3 Oct 2025 08:58:01 +0000

Bug 1990871 [wpt PR 55066] - Expose navigation.transition.to, a=testonly

Automatic update from web-platform-tests
Expose navigation.transition.to

This exposes the destination of an ongoing navigation.

Spec PR: https://github.com/whatwg/html/pull/11692
I2P: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/68d4ff4d.2b0a0220.29ae18.0091.GAE%40google.com

R=japhet@chromium.org

Bug: 447171238
Change-Id: I1d2fbb7c0b7f2656ca4392be4d1beac34d9012ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6982944
Reviewed-by: Nate Chapin <japhet@chromium.org>
Commit-Queue: Noam Rosenthal <nrosenthal@google.com>
Cr-Commit-Position: refs/heads/main@{#1520724}

--

wpt-commits: 2688294120cb74f80bdd9959e8f6bcb8c731c98f
wpt-pr: 55066

Diffstat:
Atesting/web-platform/tests/navigation-api/ordering-and-transition/transition-to.tentative.html | 39+++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+), 0 deletions(-)

diff --git a/testing/web-platform/tests/navigation-api/ordering-and-transition/transition-to.tentative.html b/testing/web-platform/tests/navigation-api/ordering-and-transition/transition-to.tentative.html @@ -0,0 +1,39 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.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(r => window.onload = () => t.step_timeout(r, 0)); + const precommit = Promise.withResolvers(); + const handler = Promise.withResolvers(); + const handler_done = Promise.withResolvers(); + const commit = Promise.withResolvers(); + navigation.addEventListener("navigate", e => { + e.intercept({ + async precommitHandler() { + precommit.resolve(e); + await commit.promise; + }, + async handler() { + handler.resolve(); + await handler_done.promise; + } + }); + }); + + assert_equals(navigation.transition, null); + navigation.navigate("?next"); + const navigate_event = await precommit.promise; + const old_entry = navigation.currentEntry; + assert_equals(navigation.transition.from, old_entry); + assert_equals(navigation.transition.to, navigate_event.destination); + commit.resolve(); + await handler.promise; + assert_equals(navigation.transition.from, old_entry); + assert_equals(navigation.transition.to, navigate_event.destination); + assert_equals(navigation.transition.to.url, navigation.currentEntry.url); + handler_done.resolve(); +}, "navigation.transition.to matches the navigate event's destination"); +</script>