[wpt-sync] Sync PR 34017 - Add permission automation support for registerProtocolHandler
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 34017 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/34017
Details from upstream follow.
Javier Fernández García-Boente <jfernandez@igalia.com> wrote:
Add permission automation support for registerProtocolHandler
After we landed in rXXXX the new protocol-handler permission descriptor we can now use it to set the permission status in WPT, using WebDriver.
This CL changes the registerProtocolHandler method implementation of both the content-shell and Chrome to check whether a permission status has been already set. In content-shell we don't ask the user, but in chrome we use the RequestPermissionManager, which eventually may launch a prompt dialog.
We only have manual tests for the registerProtocolHandler method, precisely due to the user_gesture requirement and the prompt dialog. We
can now use the Permission interface, via the extension commands [1] that are implemented by the WebDriver API.In the case of the content-shell, we are just looking for any permission status already set and in the WebTestPermissionManager instance. For Chrome, instead, we have added a new method to check the devtools_permission_overrides_ cache. We want in this case to avoid getting the actual permission status (using the helper).
There is an ongoing discussion [2] with the WPT community in the issue in this CL.
[1] https://w3c.github.io/permissions/#automation
[2] https://github.com/web-platform-tests/wpt/issues/26819Bug: 1321073
Change-Id: I4fb9cd0871fb9d086071a151cdea7642dbcd3e2bReviewed-on: https://chromium-review.googlesource.com/3634523
WPT-Export-Revision: 4b7fe58aa1fdd2ea56f26395daeafb9df7011903
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•2 years ago
|
Description
•