Permission automation for registerProtocolHandler
- Category
- Miscellaneous
- Type
- New or changed feature
- Status
- No longer pursuing (Chrome No longer pursuing)
- Intent stage
- Start prototyping
Summary
Provides Automated testing support for the registerProtocolHandler() method, so that we can avoid the user prompt dialog for granting permission for the protocol handler registration. We would need to define a new 'PermissionName' that we can use as part of the 'PermissionDescriptor' argument for the SetPermission command provided by the WebDriver API.
Motivation
Currently there are only manual tests in the WPT repository to cover the registerProtocolHandler functionality. The main challenges to implement automated testing are: * UserActivation: The registerProtocolHandler method requires transient activation to consider the request; otherwise it'll be ignored. * Permission prompt dialog: Although the spec is quite vague on this regard, current implementations (Firefox and Chrome) requires the user to grant permissions for the handler registration. Using the test_driver.set_permission function we could make tests like this way: promise_setup(async () => { await test_driver.set_permission({name: 'protocol-handler'}, 'granted'); await test_driver.bless('handler registration'); // Provides UserActivation register(); });
Standards & signals
- Specification: https://html.spec.whatwg.org/multipage/system-state.html#custom-handlers
- Firefox: No signal
- Safari: No signal
- Web developers: No signals
- Tracking bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1321073
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=permission-automation-for-registerprotocolhandler
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Permission%20automation%20for%20registerProtocolHandler
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Permission%20automation%20for%20registerProtocolHandler
- Baseline status: https://webstatus.dev/?q=Permission%20automation%20for%20registerProtocolHandler
Explainers: https://github.com/Igalia/explainers/blob/main/custom-protocol-handlers/Permission-API/README.md