tor-browser

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

commit 3a3bf79d00190ea611d1085815a80f4d7b998464
parent ef0195a8c0286ae27b2a4d3d7ce5120dffce0db8
Author: Sam Foster <sfoster@mozilla.com>
Date:   Tue,  9 Dec 2025 19:01:18 +0000

Bug 2003397 - Adjust expected coords of the flickering reload button when sidebar.revamp=true. r=kcochrane

Differential Revision: https://phabricator.services.mozilla.com/D274677

Diffstat:
Mbrowser/base/content/test/performance/browser_windowopen.js | 18+++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/browser/base/content/test/performance/browser_windowopen.js b/browser/base/content/test/performance/browser_windowopen.js @@ -23,6 +23,8 @@ add_setup(async function setup() { }); }); +const SIDEBAR_REVAMP = Services.prefs.getBoolPref("sidebar.revamp"); + /* * This test ensures that there are no unexpected * uninterruptible reflows or flickering areas when opening new windows. @@ -68,11 +70,17 @@ add_task(async function () { exceptions: [ { name: "bug 1421463 - reload toolbar icon shouldn't flicker", - condition: r => - inRange(r.h, 13, 14) && - inRange(r.w, 14, 16) && // icon size - inRange(r.y1, 40, 80) && // in the toolbar - inRange(r.x1, 65, 100), // near the left side of the screen + condition: r => { + // sidebar.revamp places the sidebar button in the toolbar, + // which offsets the position of the reload button by about 36px. + const xOffset = SIDEBAR_REVAMP ? 36 : 0; + return ( + inRange(r.h, 13, 14) && + inRange(r.w, 14, 16) && // icon size + inRange(r.y1, 40, 80) && // in the toolbar + inRange(r.x1, 65 + xOffset, 100 + xOffset) // near the left side of the screen + ); + }, }, { name: "bug 1555842 - the urlbar shouldn't flicker",