Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/browser_object_tracker_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def wait_for_blocked_tracking_icon(
self, nav: Navigation, page: BasePage
) -> BasePage:
"""
Waits for the shield icon to indicate that cookies/trackers are being blocked by continuously refresing the page
Waits for the shield icon to indicate that cookies/trackers are being blocked by continuously refreshing the page

Remember to open the passed in page beforehand, this waits for the page to load.

Expand Down
5 changes: 5 additions & 0 deletions tests/downloads/test_download_pdf_from_context_menu.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from platform import system
from time import sleep

import pytest
Expand All @@ -24,6 +25,10 @@ def delete_files_regex_string():
PDF_TELEMETRY_DATA = ["downloads", "added", "fileExtension", "pdf"]


@pytest.mark.skipif(
system().lower().startswith("darwin") or system().lower().startswith("linux"),
reason="bug 1994061",
)
@pytest.mark.headed
def test_download_pdf_from_context_menu(
driver: Firefox,
Expand Down
14 changes: 10 additions & 4 deletions tests/preferences/test_clear_cookie_data.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from platform import system

import pytest
from selenium.webdriver import Firefox
from selenium.webdriver.support.ui import WebDriverWait
Expand All @@ -24,7 +26,7 @@ def _dialog_options_present(about_prefs: AboutPrefs) -> bool:
return False


def open_clear_cookies_data_dialog(
def _open_clear_cookies_data_dialog(
about_prefs: AboutPrefs, ba: BrowserActions, wait: WebDriverWait
):
"""
Expand Down Expand Up @@ -53,6 +55,10 @@ def open_clear_cookies_data_dialog(


# @pytest.mark.skipif(WIN_GHA, reason="Test unstable in Windows GA, tracked in 1990570")
@pytest.mark.skipif(
system().lower().startswith("darwin") or system().lower().startswith("linux"),
reason="bug 1994055",
)
def test_clear_cookie_data(driver: Firefox):
"""
C143627: Cookies and site data can be cleared via the "Clear Data" panel
Expand All @@ -65,7 +71,7 @@ def test_clear_cookie_data(driver: Firefox):
driver.get(WEBSITE_ADDRESS)

# Open dialog and read current value (must be > 0)
cookie_value = open_clear_cookies_data_dialog(about_prefs, ba, wait)
cookie_value = _open_clear_cookies_data_dialog(about_prefs, ba, wait)
assert cookie_value > 0, f"Expected cookie/site data > 0, got {cookie_value}"

# Clear cookies and site data: open dialog again, wait for iframe, click clear
Expand All @@ -77,7 +83,7 @@ def test_clear_cookie_data(driver: Firefox):
ba.switch_to_content_context()

# Wait until the dialog reports 0 (reopen/poll via helper)
wait.until(lambda _: open_clear_cookies_data_dialog(about_prefs, ba, wait) == 0)
wait.until(lambda _: _open_clear_cookies_data_dialog(about_prefs, ba, wait) == 0)

final_value = open_clear_cookies_data_dialog(about_prefs, ba, wait)
final_value = _open_clear_cookies_data_dialog(about_prefs, ba, wait)
assert final_value == 0, f"Expected 0 after clearing, got {final_value}"
5 changes: 5 additions & 0 deletions tests/preferences/test_manage_cookie_data.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from platform import system
from time import sleep

import pytest
Expand All @@ -16,6 +17,10 @@ def test_case():
COOKIE_SITE = "google.com"


@pytest.mark.skipif(
system().lower().startswith("darwin") or system().lower().startswith("linux"),
reason="bug 1994056",
)
@pytest.mark.headed
@pytest.mark.noxvfb
def test_manage_cookie_data(driver: Firefox):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from platform import system

import pytest
from selenium.webdriver import Firefox

Expand All @@ -10,14 +12,12 @@ def test_case():
return "446323"


ALLOWED_TRACKING_URLS = set(
[
"https://content-track-digest256.dummytracker.org",
"https://ads-track-digest256.dummytracker.org",
"https://social-track-digest256.dummytracker.org",
"https://analytics-track-digest256.dummytracker.org",
]
)
ALLOWED_TRACKING_URLS = {
"https://content-track-digest256.dummytracker.org",
"https://ads-track-digest256.dummytracker.org",
"https://social-track-digest256.dummytracker.org",
"https://analytics-track-digest256.dummytracker.org",
}
BLOCKED_TRACKER_URL = "https://content-track-digest256.dummytracker.org"

FIRST_TRACKER_WEBSITE = "https://senglehardt.com/test/trackingprotection/test_pages/tracking_protection.html"
Expand Down Expand Up @@ -103,6 +103,10 @@ def test_third_party_content_blocked_private_browsing_allowed_tracking(driver: F
assert item.get_attribute("value") in ALLOWED_TRACKING_URLS


@pytest.mark.skipif(
system().lower().startswith("darwin") or system().lower().startswith("linux"),
reason="bug 1994060",
)
def test_third_party_content_private_browsing_tracking_statuses(driver: Firefox):
"""
C446323.3: Ensure that the statuses of some third party content are loaded properly
Expand Down
Loading