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

[testharness.js] Cookies can leak between tests when the same WebDriver session is used #48078

Open
jonathan-j-lee opened this issue Sep 10, 2024 · 0 comments
Labels
infra testharness.js wptrunner The automated test runner, commonly called through ./wpt run

Comments

@jonathan-j-lee
Copy link
Contributor

jonathan-j-lee commented Sep 10, 2024

For example, name=value set in

corsExposeFilter(url, "Set-Cookie", "name=value" , true);
corsExposeFilter(url, "Set-Cookie2", "name=value" , true);
corsExposeFilter(url, "Set-Cookie", "name=value" , true, true);
corsExposeFilter(url, "Set-Cookie2", "name=value" , true, true);

caused cookie counts to be off by one in an unrelated test /fetch/api/credentials/cookies.any.html.

Unfortunately, it seems difficult for wptrunner to enforce a clean slate in all cases because, AIUI, WebDriver's "Delete All Cookies" only deletes cookies applicable to the session's current URL. Thus, "Delete All Cookies" would miss cookies set on domains other than that of the test page, like:

return set_fedcm_cookie(alt_manifest_origin);

CC @jgraham @WeizhongX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra testharness.js wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

No branches or pull requests

1 participant