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] Reset permissions between tests for Chrome #48610

Conversation

jonathan-j-lee
Copy link
Contributor

@jonathan-j-lee jonathan-j-lee commented Oct 14, 2024

Similar to #48106, permissions granted with certain lifetimes may leak between tests. For now, add a Chromium-specific Browser.resetPermissions call to enforce resetting permission defaults.

To consolidate calls that reset state, refactor the WebDriver executor's testharness window management to align with #45735.

Tested in Chromium, in https://crrev.com/c/5930453 and locally:

run_headless_shell_wpt -j 1 \
  external/wpt/mediacapture-streams/MediaStream-id.https.html \
  external/wpt/mediacapture-streams/GUM-permissions-query.https.html

(MediaStream-id.https.html should no longer grant the camera permission to GUM-permissions-query.https.html.)

@jonathan-j-lee jonathan-j-lee marked this pull request as ready for review October 14, 2024 23:37
@wpt-pr-bot wpt-pr-bot added infra wptrunner The automated test runner, commonly called through ./wpt run labels Oct 14, 2024
Similar to web-platform-tests#48106, permission changes may leak between tests that use
the same WebDriver session (i.e., browser process). For now, add a
Chromium-specific `Browser.resetPermissions` call to reset permission
defaults.

To consolidate calls that reset state, refactor the WebDriver executor's
testharness window management to align with web-platform-tests#45735.
@jonathan-j-lee jonathan-j-lee merged commit bef892c into web-platform-tests:master Oct 18, 2024
33 checks passed
@jonathan-j-lee jonathan-j-lee deleted the wptrunner/chrome/reset-permissions branch October 18, 2024 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants