tor-browser

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

commit 26fd1f37a5c468a3efc812e5020d5c4cc36d56cf
parent 451cf4bca7d3f3fec5028c27d1de1ab4c29bbaf8
Author: Joey Arhar <jarhar@chromium.org>
Date:   Thu,  6 Nov 2025 21:34:24 +0000

Bug 1997715 [wpt PR 55798] - Improve waiting in find-range-from-text-directive-no-reveal.html, a=testonly

Automatic update from web-platform-tests
Improve waiting in find-range-from-text-directive-no-reveal.html

One rAF wasn't long enough for scroll to text fragment to run in
response to setting window.location.hash to a text fragment. Three rAFs
seemed to do it, but waiting for the detail's toggle event is the thing
which actually indicates that scroll to text fragment has executed.

Fixed: 453890773
Change-Id: Ic44c38dce6f1ec3c7f3b30f023775607e270e854
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7107344
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1538840}

--

wpt-commits: 1ea5c559af55e0b0ed5d3e77fb18653baf5ee830
wpt-pr: 55798

Diffstat:
Mtesting/web-platform/tests/scroll-to-text-fragment/find-range-from-text-directive-no-reveal.html | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testing/web-platform/tests/scroll-to-text-fragment/find-range-from-text-directive-no-reveal.html b/testing/web-platform/tests/scroll-to-text-fragment/find-range-from-text-directive-no-reveal.html @@ -25,7 +25,7 @@ promise_test(async t => { window.location.hash = ':~:text=abc,-def'; - await new Promise(resolve => requestAnimationFrame(resolve)); + await new Promise(resolve => details2.addEventListener('toggle', resolve)); assert_equals(hidden1.hidden, 'until-found', 'hidden=until-found element should remain hidden'); assert_false(details1.open, 'closed <details> element should remain closed');