tor-browser

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

commit 15b052cacc1b0547649881fa45b908fade8a38ed
parent b30a9b734819436853abf4eba6d768037514b3f6
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date:   Wed,  8 Oct 2025 22:50:22 +0000

Bug 1993201 - add a UA override for portal.pilot.ly; r=webcompat-reviewers,ksenia

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

Diffstat:
Mbrowser/extensions/webcompat/data/interventions.json | 15+++++++++++++++
Mbrowser/extensions/webcompat/manifest.json | 2+-
Atesting/webcompat/interventions/tests/test_1993201_portal_pilot_ly.py | 39+++++++++++++++++++++++++++++++++++++++
3 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json @@ -5432,5 +5432,20 @@ "ua_string": ["add_Chrome"] } ] + }, + "1993201": { + "label": "portal.pilot.ly", + "bugs": { + "1993201": { + "issue": "firefox-blocked-completely", + "matches": ["*://portal.pilot.ly/*"] + } + }, + "interventions": [ + { + "platforms": ["all"], + "ua_string": ["add_Chrome"] + } + ] } } diff --git a/browser/extensions/webcompat/manifest.json b/browser/extensions/webcompat/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Web Compatibility Interventions", "description": "Urgent post-release fixes for web compatibility.", - "version": "145.7.0", + "version": "145.8.0", "browser_specific_settings": { "gecko": { "id": "webcompat@mozilla.org", diff --git a/testing/webcompat/interventions/tests/test_1993201_portal_pilot_ly.py b/testing/webcompat/interventions/tests/test_1993201_portal_pilot_ly.py @@ -0,0 +1,39 @@ +import pytest + +URL = "https://previewinsights.qualtrics.com/jfe/form/SV_a5Gnoq0OsdUzvGm?Q_DL=hq7SUdQWjweSxhT_a5Gnoq0OsdUzvGm_CGC_DNCiEfKhsuDlymq&Q_CHL=email" + +WATCH_NOW_CSS = "a[href*='portal.pilot.ly/process-target']" +AVANTI_CSS = "button.begin-registration" +SUPPORTED_CSS = "#root .pilotly-player" +UNSUPPORTED_TEXT1 = "Firefox not supported" +UNSUPPORTED_TEXT2 = "Google Chrome" + + +async def get_to_page(client): + await client.navigate(URL, wait="none") + client.soft_click(client.await_css(WATCH_NOW_CSS, is_displayed=True)) + client.soft_click(client.await_css(AVANTI_CSS, is_displayed=True)) + + +@pytest.mark.asyncio +@pytest.mark.with_interventions +async def test_enabled(client): + await get_to_page(client) + assert client.await_css(SUPPORTED_CSS, is_displayed=True) + assert not client.find_text(UNSUPPORTED_TEXT2, is_displayed=True) + assert not client.find_text(UNSUPPORTED_TEXT2, is_displayed=True) + + +@pytest.mark.asyncio +@pytest.mark.without_interventions +async def test_disabled(client): + await get_to_page(client) + no_firefox, use_chrome = client.await_first_element_of( + [ + client.text(UNSUPPORTED_TEXT1), + client.text(UNSUPPORTED_TEXT2), + ], + is_displayed=True, + ) + assert no_firefox or use_chrome + assert not client.find_css(SUPPORTED_CSS, is_displayed=True)