tor-browser

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

commit cc9ffac1c9d6b857ccf3c27b7af6543811762d4f
parent 5504d457aac8b00c04798b80186529d0d8cffbd9
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date:   Wed,  8 Oct 2025 13:38:21 +0000

Bug 1992402 - add a UA override for ehssrisk.sai360.net; r=denschub,webcompat-reviewers

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

Diffstat:
Mbrowser/extensions/webcompat/data/interventions.json | 15+++++++++++++++
Atesting/webcompat/interventions/tests/test_1992402_apac_ehssrisk_sai360_net.py | 22++++++++++++++++++++++
2 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json @@ -5387,5 +5387,20 @@ "ua_string": ["Chrome_with_FxQuantum"] } ] + }, + "1992402": { + "label": "ehssrisk.sai360.net", + "bugs": { + "1992402": { + "issue": "firefox-blocked-completely", + "matches": ["*://*.ehssrisk.com/*"] + } + }, + "interventions": [ + { + "platforms": ["all"], + "ua_string": ["add_Chrome"] + } + ] } } diff --git a/testing/webcompat/interventions/tests/test_1992402_apac_ehssrisk_sai360_net.py b/testing/webcompat/interventions/tests/test_1992402_apac_ehssrisk_sai360_net.py @@ -0,0 +1,22 @@ +import pytest + +URL = "https://anz4.ehssrisk.com/fisherandpaykel/" + +SUPPORTED_CSS = "#openIdLogin" +UNSUPPORTED_TEXT = "Unsupported Browser Detected" + + +@pytest.mark.asyncio +@pytest.mark.with_interventions +async def test_enabled(client): + await client.navigate(URL, wait="none") + assert client.await_css(SUPPORTED_CSS, is_displayed=True) + assert not client.find_text(UNSUPPORTED_TEXT, is_displayed=True) + + +@pytest.mark.asyncio +@pytest.mark.without_interventions +async def test_disabled(client): + await client.navigate(URL, wait="none") + assert client.await_text(UNSUPPORTED_TEXT, is_displayed=True) + assert not client.find_css(SUPPORTED_CSS, is_displayed=True)