tor-browser

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

commit c7201789feec89aa2b8aa6a57a0efd4483647832
parent 2c813043a22d85744e1ffcd12af02b0bb432f13a
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date:   Tue, 25 Nov 2025 16:52:44 +0000

Bug 1998101 - also apply our intervention for Will's Vegan Shop to wills-vegan-shop.de and vegan-store.eu; r=denschub,webcompat-reviewers

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

Diffstat:
Mbrowser/extensions/webcompat/data/interventions.json | 4++++
Atesting/webcompat/interventions/tests/test_1998101_vegan-store_eu.py | 24++++++++++++++++++++++++
Atesting/webcompat/interventions/tests/test_1998101_wills-vegan-shop_de.py | 24++++++++++++++++++++++++
3 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json @@ -5077,6 +5077,10 @@ "1969245": { "issue": "broken-images", "matches": ["*://www.wills-vegan-store.com/*"] + }, + "1998101": { + "issue": "broken-images", + "matches": ["*://*.wills-vegan-shop.de/*", "*://*.vegan-store.eu/*"] } }, "interventions": [ diff --git a/testing/webcompat/interventions/tests/test_1998101_vegan-store_eu.py b/testing/webcompat/interventions/tests/test_1998101_vegan-store_eu.py @@ -0,0 +1,24 @@ +import pytest + +URL = "https://vegan-store.eu/collections/vegan-fashion-mens" +WRAPPER_CSS = ".media-wrapper :has(img.motion-reduce)" + + +async def are_product_images_visible(client): + await client.navigate(URL, wait="none") + wrapper = client.await_css(WRAPPER_CSS, is_displayed=True) + return client.execute_script( + "return arguments[0].getBoundingClientRect().width > 0", wrapper + ) + + +@pytest.mark.asyncio +@pytest.mark.with_interventions +async def test_enabled(client): + assert await are_product_images_visible(client) + + +@pytest.mark.asyncio +@pytest.mark.without_interventions +async def test_disabled(client): + assert not await are_product_images_visible(client) diff --git a/testing/webcompat/interventions/tests/test_1998101_wills-vegan-shop_de.py b/testing/webcompat/interventions/tests/test_1998101_wills-vegan-shop_de.py @@ -0,0 +1,24 @@ +import pytest + +URL = "https://wills-vegan-shop.de/collections/vegane-damenmode" +WRAPPER_CSS = ".media-wrapper :has(img.motion-reduce)" + + +async def are_product_images_visible(client): + await client.navigate(URL, wait="none") + wrapper = client.await_css(WRAPPER_CSS, is_displayed=True) + return client.execute_script( + "return arguments[0].getBoundingClientRect().width > 0", wrapper + ) + + +@pytest.mark.asyncio +@pytest.mark.with_interventions +async def test_enabled(client): + assert await are_product_images_visible(client) + + +@pytest.mark.asyncio +@pytest.mark.without_interventions +async def test_disabled(client): + assert not await are_product_images_visible(client)