summaryrefslogtreecommitdiffstats
path: root/testing/webcompat/shims/tests/test_1767270_rva311_com_pbm_fix.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/webcompat/shims/tests/test_1767270_rva311_com_pbm_fix.py
parentInitial commit. (diff)
downloadfirefox-esr-upstream.tar.xz
firefox-esr-upstream.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/webcompat/shims/tests/test_1767270_rva311_com_pbm_fix.py')
-rw-r--r--testing/webcompat/shims/tests/test_1767270_rva311_com_pbm_fix.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/testing/webcompat/shims/tests/test_1767270_rva311_com_pbm_fix.py b/testing/webcompat/shims/tests/test_1767270_rva311_com_pbm_fix.py
new file mode 100644
index 0000000000..2e30bae2cb
--- /dev/null
+++ b/testing/webcompat/shims/tests/test_1767270_rva311_com_pbm_fix.py
@@ -0,0 +1,26 @@
+import pytest
+
+URL = "https://www.rva311.com/rvaone"
+SHIM_ACTIVE_MSG = "Private Browsing Web APIs is being shimmed by Firefox"
+IDB_FAILURE_MSG = "InvalidStateError: A mutation operation was attempted on a database"
+
+
+@pytest.mark.asyncio
+@pytest.mark.with_private_browsing
+@pytest.mark.with_shims
+async def test_with_shim(client, platform):
+ msg = None if platform == "android" else SHIM_ACTIVE_MSG
+ await client.navigate(URL, await_console_message=msg)
+ desktop, mobile = client.await_first_element_of(
+ [client.css("#root nav"), client.css("#mobilePageTitle")], is_displayed=True
+ )
+ assert desktop or mobile
+
+
+@pytest.mark.asyncio
+@pytest.mark.with_private_browsing
+@pytest.mark.without_shims
+async def test_without_shim(client, platform):
+ msg = None if platform == "android" else IDB_FAILURE_MSG
+ await client.navigate(URL, await_console_message=msg)
+ assert client.find_css("#root [class*='loading-dot']", is_displayed=True)