tor-browser

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

commit 678a5e4bec55d7bd5729fe4af76dba52f390fcc2
parent b7c64a2151db790567ccbc506705aaa2478ffff9
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date:   Tue, 21 Oct 2025 14:47:23 +0000

Bug 1902450 - add a desktop-only UA override for hilokal.com; r=webcompat-reviewers,ksenia

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

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

diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json @@ -3204,6 +3204,21 @@ } ] }, + "1902450": { + "label": "hilokal.com", + "bugs": { + "1902450": { + "issue": "firefox-blocked-completely", + "matches": ["*://www.hilokal.com/*"] + } + }, + "interventions": [ + { + "platforms": ["desktop"], + "ua_string": ["add_Chrome"] + } + ] + }, "1902454": { "label": "onvideo.kuaishou.com", "bugs": { diff --git a/testing/webcompat/interventions/tests/test_1902450_hilokal_com.py b/testing/webcompat/interventions/tests/test_1902450_hilokal_com.py @@ -0,0 +1,40 @@ +import pytest +from webdriver import NoSuchElementException + +URL = "https://www.hilokal.com/" +UNSUPPORTED_TEXT = "Chrome" +HERO_CSS = "button.download-button" +LISTEN_BUTTON_CSS = "button.home-main-listen-button-text" + + +async def does_warning_appear(client): + await client.navigate(URL) + try: + client.await_text(UNSUPPORTED_TEXT, is_displayed=True, timeout=3) + return True + except NoSuchElementException: + return False + + +@pytest.mark.skip_platforms("android") +@pytest.mark.asyncio +@pytest.mark.with_interventions +async def test_enabled(client): + assert not await does_warning_appear(client) + + +@pytest.mark.skip_platforms("android") +@pytest.mark.asyncio +@pytest.mark.without_interventions +async def test_disabled(client): + assert await does_warning_appear(client) + + +@pytest.mark.only_platforms("android") +@pytest.mark.asyncio +@pytest.mark.without_interventions +async def test_missing_android_support(client): + await client.navigate(URL, wait="none") + assert client.await_css(HERO_CSS, is_displayed=True) + await client.stall(1) + assert not client.find_css(LISTEN_BUTTON_CSS, is_displayed=True)