tor-browser

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

commit 1fda937152c2eefc9c56f546dea6add88f86479b
parent c1ba184ae9fbe4c88848a4e3cb6b5aef93898d19
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date:   Fri, 17 Oct 2025 21:02:59 +0000

Bug 1991941 - add an Android-only UA override for brawlstats.com to get their mobile layout; r=webcompat-reviewers,ksenia

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

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

diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json @@ -5349,6 +5349,21 @@ } ] }, + "1991941": { + "label": "brawlstats.com", + "bugs": { + "1991941": { + "issue": "desktop-layout-not-mobile", + "matches": ["*://brawlstats.com/*"] + } + }, + "interventions": [ + { + "platforms": ["android"], + "ua_string": ["Chrome_with_FxQuantum"] + } + ] + }, "1992121": { "label": "tutor-uksouth.classroom.cloud", "bugs": { diff --git a/testing/webcompat/interventions/tests/test_1991941_brawlstats_com.py b/testing/webcompat/interventions/tests/test_1991941_brawlstats_com.py @@ -0,0 +1,23 @@ +import pytest + +URL = "https://brawlstats.com/" +DESKTOP_CSS = "#app.isDesktop" +MOBILE_CSS = "#app.isMobile" + + +@pytest.mark.only_platforms("android") +@pytest.mark.asyncio +@pytest.mark.with_interventions +async def test_enabled(client): + await client.navigate(URL) + assert client.await_css(MOBILE_CSS, is_displayed=True) + assert not client.find_css(DESKTOP_CSS, is_displayed=True) + + +@pytest.mark.only_platforms("android") +@pytest.mark.asyncio +@pytest.mark.without_interventions +async def test_disabled(client): + await client.navigate(URL) + assert client.await_css(DESKTOP_CSS, is_displayed=True) + assert not client.find_css(MOBILE_CSS, is_displayed=True)