tor-browser

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

commit fe709b5b10a87327bfd0de8ec58661308bbb34e0
parent a048ac691af900a648464ff6a95c715ed21eb3a1
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Wed, 15 Oct 2025 13:49:02 +0000

Bug 1994245 - Give a full pixel of slop to window resizing on translations tests. r=nordzilla,translations-reviewers

This doesn't fix the issue on automation but fixes timeouts locally. The
reason I didn't catch these was that on wayland these tests perma
timeout for me even before my patch.

Due to fractional scaling, the window might not be able to be sized
exactly at the size we want, and outerHeight/outerWidth round...

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

Diffstat:
Mtoolkit/components/translations/tests/browser/shared-head.js | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/toolkit/components/translations/tests/browser/shared-head.js b/toolkit/components/translations/tests/browser/shared-head.js @@ -1368,12 +1368,16 @@ class MockedA11yUtils { */ async function ensureWindowSize(win, width, height) { if ( - Math.abs(win.outerWidth - width) < 1 && - Math.abs(win.outerHeight - height) < 1 + Math.abs(win.outerWidth - width) <= 1 && + Math.abs(win.outerHeight - height) <= 1 ) { return; } + info( + `Resizing to ${width}x${height} (currently ${win.outerWidth}x${win.outerHeight})` + ); + const resizePromise = BrowserTestUtils.waitForEvent(win, "resize"); win.resizeTo(width, height);