File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ # RFC X: Add Custom Handlers support to testdriver.js
2
+
3
+ ## Summary
4
+
5
+ Add testdriver.js support for [ Custom Handlers] ( https://html.spec.whatwg.org/multipage/system-state.html#custom-handlers/ ) , by
6
+ supporting a ` setRPHRegistrationMode ` command ([ spec
7
+ PR] )(https://github.com/whatwg/html/pull/8267 ).
8
+
9
+ ## Details
10
+
11
+ The proposed ` setRPHRegistrationMode ` command places the user agent in a mode
12
+ where it will automatically accept or reject (depending on the mode) future
13
+ Custom Protocol Handlers registrations. This allows full end-to-end
14
+ testing of Custom Handlers API (eg, registerProtocolHandler), which normally [ requires user
15
+ interaction] ( https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-registerprotocolhandler )
16
+ to confirm the user's consent to the protocol registration.
17
+
18
+ Links:
19
+ - [ WIP spec PR] ( https://github.com/whatwg/html/pull/8267 )
20
+ - [ WIP web-platform-tests implementation PR] ( https://github.com/web-platform-tests/wpt/pull/35792 )
21
+ - [ WIP Chromedriver implementation] ( https://chromium-review.googlesource.com/c/chromium/src/+/3865270 )
22
+
23
+ ### Alternatives Considered
24
+
25
+ I've also considered the usag of the already defined [ Set Permission] ( https://w3c.github.io/permissions/#set-permission-command )
26
+ extension command, implemented at least by Chromedriver. In order to use such command, we would need to define a
27
+ new permission descriptor for the Custom Handlers feature. Such [ proposal] ( https://github.com/whatwg/html/issues/7920 )
28
+ has been discussed and rejected by Chrome and Firefox implementors.
29
+
30
+ ## Risks
31
+
32
+ This increases the API surface of testdriver.js, so it's more code to maintain
33
+ or reason about.
You can’t perform that action at this time.
0 commit comments