tor-browser

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

commit 0fd4d29f111b160609e1110d5ddc0ad2653ff4c3
parent 8d56ee3cbdc959df64899f83db562f191ad22a53
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date:   Fri, 19 Dec 2025 23:16:54 +0000

Bug 2004679 - add a UA override for paybill.com; r=webcompat-reviewers,ksenia

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

Diffstat:
Mbrowser/extensions/webcompat/data/interventions.json | 15+++++++++++++++
Mbrowser/extensions/webcompat/lib/intervention_helpers.js | 3+++
Atesting/webcompat/interventions/tests/test_2004679_paybill_com.py | 21+++++++++++++++++++++
3 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json @@ -6186,5 +6186,20 @@ } } ] + }, + "2004679": { + "label": "paybill.com", + "bugs": { + "2004679": { + "issue": "firefox-blocked-completely", + "matches": ["*://paybill.com/occourts/*"] + } + }, + "interventions": [ + { + "platforms": ["all"], + "ua_string": ["replace_colon_in_rv_with_space"] + } + ] } } diff --git a/browser/extensions/webcompat/lib/intervention_helpers.js b/browser/extensions/webcompat/lib/intervention_helpers.js @@ -267,6 +267,9 @@ var InterventionHelpers = { mimic_Android_Hotspot2_device: ua => { return UAHelpers.androidHotspot2Device(ua); }, + replace_colon_in_rv_with_space: ua => { + return ua.replace("rv:", "rv "); + }, reduce_firefox_version_by_one: ua => { const [head, fx, tail] = ua.split(/(firefox\/)/i); if (!fx || !tail) { diff --git a/testing/webcompat/interventions/tests/test_2004679_paybill_com.py b/testing/webcompat/interventions/tests/test_2004679_paybill_com.py @@ -0,0 +1,21 @@ +import pytest + +URL = "https://paybill.com/occourts/" +SUPPORTED_CSS = "#ctl00_ContentPlaceHolder1_EasyPayNumberTextBox" +UNSUPPORTED_TEXT = "We no longer support Internet Explorer" + + +@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)