diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/webcompat/shims/tests/test_1717806_adsafeprotected.py | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/webcompat/shims/tests/test_1717806_adsafeprotected.py')
-rw-r--r-- | testing/webcompat/shims/tests/test_1717806_adsafeprotected.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/testing/webcompat/shims/tests/test_1717806_adsafeprotected.py b/testing/webcompat/shims/tests/test_1717806_adsafeprotected.py new file mode 100644 index 0000000000..e7a530e141 --- /dev/null +++ b/testing/webcompat/shims/tests/test_1717806_adsafeprotected.py @@ -0,0 +1,37 @@ +import pytest + +from .common import verify_redirectors + +URLS = { + "https://x.adsafeprotected.com/x.gif?1": "image", + "https://x.adsafeprotected.com/x.png?1": "image", + "https://x.adsafeprotected.com/x/x": "image", + "https://x.adsafeprotected.com/img": "image", + "https://x.adsafeprotected.com/x.js?1": "js", + "https://x.adsafeprotected.com/x/adj?1": "js", + "https://x.adsafeprotected.com/x/imp/1": "js", + "https://x.adsafeprotected.com/x/Serving/1": "js", + "https://x.adsafeprotected.com/x/unit/1": "js", + "https://x.adsafeprotected.com/jload": "js", + "https://x.adsafeprotected.com/jload?1": "js", + "https://x.adsafeprotected.com/jsvid": "js", + "https://x.adsafeprotected.com/jsvid?1": "js", + "https://x.adsafeprotected.com/mon?1": "js", + "https://x.adsafeprotected.com/tpl": "js", + "https://x.adsafeprotected.com/tpl?1": "js", + "https://x.adsafeprotected.com/services/pub?1": "js", +} + + +@pytest.mark.asyncio +@pytest.mark.with_strict_etp +@pytest.mark.with_shims +async def test_works_with_shims(client): + await verify_redirectors(client, URLS, "REDIRECTED") + + +@pytest.mark.asyncio +@pytest.mark.with_strict_etp +@pytest.mark.without_shims +async def test_works_without_etp(client): + await verify_redirectors(client, URLS, "BLOCKED") |