Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wptrunner] Delete all cookies after navigating to testharness runner page #48057

Conversation

jonathan-j-lee
Copy link
Contributor

... for WebDriver-based browsers. This should fix some flakiness when an unrelated test leaks cookies and the browser is not restarted.

Many tests already delete cookies during setup, but this new callsite:

  1. Guarantees a clean slate enforced by the harness
  2. Works for non-window scopes that don't have access to test_driver.delete_all_cookies()

... for WebDriver-based browsers. This should fix some flakiness [1]
when an unrelated test leaks cookies [2] and the browser is not
restarted.

Many tests already delete cookies during setup, but this new callsite:
1. Guarantees a clean slate enforced by the harness
2. Works for non-`window` scopes that don't have access to
   `test_driver.delete_all_cookies()`

[1]: https://ci.chromium.org/ui/p/chromium/builders/ci/linux-wpt-chromium-rel/11454/test-results?q=ExactID%3Aninja%3A%2F%2F%3Aheadless_shell_wpt%2Fexternal%2Fwpt%2Ffetch%2Fapi%2Fcredentials%2Fcookies.any.serviceworker.html+VHash%3A0c0dfda1bb530016
[2]: https://github.com/web-platform-tests/wpt/blob/4af0c1ce/fedcm/support/set_cookie.headers
@jonathan-j-lee jonathan-j-lee changed the title [wptrunner] Delete all cookies after navigating to testharness test page [wptrunner] Delete all cookies after navigating to testharness runner page Sep 9, 2024
@jonathan-j-lee
Copy link
Contributor Author

I realized this won't work generally because delete_all_cookies won't delete cookies not scoped to /testharness_runner.html.

@jonathan-j-lee jonathan-j-lee deleted the wptrunner/clear-cookies branch September 9, 2024 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant