tor-browser

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

commit 7e528888d7f4af37929e2ae18e4f93f85dfc58e5
parent 763eb1c301cc9d50c345c7bc64d0c39a2bd53f6f
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date:   Fri, 21 Nov 2025 21:57:55 +0000

Bug 1999770 - add a CSS webcompat intervention for configuraraparelhos.claro.com.br; r=ksenia,webcompat-reviewers

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

Diffstat:
Mbrowser/extensions/webcompat/data/interventions.json | 19+++++++++++++++++++
Abrowser/extensions/webcompat/injections/css/1999770-configuraraparelhos.claro.com.br-fix-missing-text.css | 14++++++++++++++
Atesting/webcompat/interventions/tests/test_1999770_configuraraparelhos_claro_com_br.py | 39+++++++++++++++++++++++++++++++++++++++
3 files changed, 72 insertions(+), 0 deletions(-)

diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json @@ -6045,6 +6045,25 @@ } ] }, + "1999770": { + "label": "configuraraparelhos.claro.com.br", + "bugs": { + "1999770": { + "issue": "broken-layout", + "matches": ["*://configuraraparelhos.claro.com.br/*"] + } + }, + "interventions": [ + { + "platforms": ["desktop"], + "content_scripts": { + "css": [ + "1999770-configuraraparelhos.claro.com.br-fix-missing-text.css" + ] + } + } + ] + }, "2000558": { "label": "www.jal.co.jp", "bugs": { diff --git a/browser/extensions/webcompat/injections/css/1999770-configuraraparelhos.claro.com.br-fix-missing-text.css b/browser/extensions/webcompat/injections/css/1999770-configuraraparelhos.claro.com.br-fix-missing-text.css @@ -0,0 +1,14 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/** + * configuraraparelhos.claro.com.br - phone description text is not shown + * Bug #1999770 - https://bugzilla.mozilla.org/show_bug.cgi?id=1999770 + * WebCompat issue #188458 - https://github.com/webcompat/web-bugs/issues/188458 + * + * We can drop a flex-grow declaration to un-hide the "missing" text. + */ +.qelp-step.usecase-step .step-card .text-content-wrapper { + flex-grow: unset; +} diff --git a/testing/webcompat/interventions/tests/test_1999770_configuraraparelhos_claro_com_br.py b/testing/webcompat/interventions/tests/test_1999770_configuraraparelhos_claro_com_br.py @@ -0,0 +1,39 @@ +import pytest + +URL = "https://configuraraparelhos.claro.com.br/sistema-operacional/samsung-android-15/como-ativar-ou-desativar-a-rede-5g" + +PHONE_DESCRIPTION_TEXT_CSS = ".text-content-paragraphs" + + +async def are_phone_descriptions_visible(client): + await client.navigate(URL, wait="none") + return client.execute_script( + """ + const text = arguments[0]; + const textBottom = text.getBoundingClientRect().bottom; + const cardBottom = text.closest(".step-card").getBoundingClientRect().bottom; + return textBottom <= cardBottom; + """, + client.await_css(PHONE_DESCRIPTION_TEXT_CSS, is_displayed=True), + ) + + +@pytest.mark.skip_platforms("android") +@pytest.mark.asyncio +@pytest.mark.with_interventions +async def test_enabled(client): + assert await are_phone_descriptions_visible(client) + + +@pytest.mark.skip_platforms("android") +@pytest.mark.asyncio +@pytest.mark.without_interventions +async def test_disabled(client): + assert not await are_phone_descriptions_visible(client) + + +@pytest.mark.only_platforms("android") +@pytest.mark.asyncio +@pytest.mark.without_interventions +async def test_android(client): + assert await are_phone_descriptions_visible(client)