tor-browser

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

commit b264ffe5c8dbba5c38f4660af7c6f1f7cfdaf5ee
parent f9a3a71076fe19c848b8a519c6dec8239d5d6ec8
Author: Valentin Gosu <valentin.gosu@gmail.com>
Date:   Thu,  8 Jan 2026 10:48:56 +0000

Bug 1928537 - Fix raciness in browser_necko_l10n.js r=necko-reviewers,sunil

Bug 1986649 changed the test to also check the statuspanellabel for the
expected string, however that value is not always synchronized with
the onStatusChange event, leading to intermittent failures.

This change fixes it so that we allow both "Looking up ..." and
"Transferring data from ..." status strings.
It is still possible that the test would be racy (other status panel
values are possible), but all current failures have one of these two strings.

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

Diffstat:
Mnetwerk/test/browser/browser_necko_l10n.js | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/netwerk/test/browser/browser_necko_l10n.js b/netwerk/test/browser/browser_necko_l10n.js @@ -95,10 +95,10 @@ add_task(async function test_domain_change() { // There's a delay in the status label being updated, so by the time the // progress listener sees waiting for, the statuspanel is still on // looking up. This may be racy. - is( - statuspanelLabel.value, - `Looking up ${DOMAIN_NAME}…`, - "statuspanel has expected value" + ok( + statuspanelLabel.value == `Looking up ${DOMAIN_NAME}…` || + statuspanelLabel.value == `Transferring data from ${DOMAIN_NAME}…`, + `statuspanel has expected value. got ${statuspanelLabel.value}` ); is(message, expectedMessage, "Status message was received correctly"); });