commit 46c2a5935bb4a2fda4dad8ad6779457010d7604a
parent 7ba8e8c9e2dd89548c9c7cc84692837921e9f8f0
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date: Tue, 4 Nov 2025 18:29:45 +0000
Bug 1996137 - add an Android-only UA override for trip.com; r=webcompat-reviewers,ksenia
Differential Revision: https://phabricator.services.mozilla.com/D271268
Diffstat:
2 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json
@@ -5935,6 +5935,21 @@
}
]
},
+ "1996137": {
+ "label": "trip.com",
+ "bugs": {
+ "1996137": {
+ "issue": "firefox-blocked-completely",
+ "matches": ["*://*.trip.com/webapp/*"]
+ }
+ },
+ "interventions": [
+ {
+ "platforms": ["android"],
+ "ua_string": ["Chrome_with_FxQuantum"]
+ }
+ ]
+ },
"1997687": {
"label": "sakti.kemenkeu.go.id",
"bugs": {
diff --git a/testing/webcompat/interventions/tests/test_1996137_trip_com.py b/testing/webcompat/interventions/tests/test_1996137_trip_com.py
@@ -0,0 +1,24 @@
+import pytest
+
+URL = "https://www.trip.com/webapp/cw/afterservice/OrderDetail.html"
+
+SUPPORTED_TEXT = "Something went wrong"
+UNSUPPORTED_TEXT = "browser is not supported"
+
+
+@pytest.mark.only_platforms("android")
+@pytest.mark.asyncio
+@pytest.mark.with_interventions
+async def test_enabled(client):
+ await client.navigate(URL, wait="none")
+ assert client.await_text(SUPPORTED_TEXT, is_displayed=True)
+ assert not client.find_text(UNSUPPORTED_TEXT, is_displayed=True)
+
+
+@pytest.mark.only_platforms("android")
+@pytest.mark.asyncio
+@pytest.mark.without_interventions
+async def test_disabled(client):
+ await client.navigate(URL, wait="none")
+ assert client.await_text(UNSUPPORTED_TEXT, is_displayed=True)
+ assert not client.find_text(SUPPORTED_TEXT, is_displayed=True)