← Back to release summary

SetRPHRegistrationMode WebDriver extension comnand

Category
Miscellaneous
Type
No developer-visible change
Status
In development (Chrome In development)
Intent stage
Start prototyping

WPT details: https://wpt.fyi/results/html/webappapis/system-state-and-capabilities/the-navigator-object?label=master&label=experimental&aligned&q=protocol-handler

Summary

The proposed `setRPHRegistrationMode` WebDriver extension command places the user agent in a mode where it will automatically accept or reject (depending on the mode) future Custom Protocol Handlers registrations. This allows full end-to-end testing of Custom Handlers API (eg, registerProtocolHandler), which normally requires user interaction to confirm the user's consent to the protocol registration.

Motivation

The HTML spec states in the Custom Handler section that user agents may launch a prompt dialog during the registration of a custom protocol handler: A user agent could, for instance, prompt the user and offer the user the opportunity to add the site to a shortlist of handlers, or make the handlers their default, or cancel the request. User agents could also silently collect the information, providing it only when relevant to the user. Currently, there are only manual tests for the registerProtocolHandler method: https://github.com/web-platform-tests/wpt/blob/master/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol-handler-fragment-nosw-manual.https.html The main problem is that Chrome, and also Firefox, launch a prompt dialog to ask the user for confirmation to register the protocol handler. We could provide testing automation if we had a WebDriver extension command that would autogrant or autoreject the registration request.

Standards & signals

Ecosystem

View on chromestatus.com