wpt icon indicating copy to clipboard operation
wpt copied to clipboard

Test automation for custom handlers

Open javifernandez opened this issue 3 years ago • 1 comments

This commit implements the actions and protocol to use a new webdriver extension command to allow testing automation of the registerProtocolHandler method.

Additionally, this change also adds new tests which are automated versions of the manual tests already defined for the registerProtocolHandler method.

javifernandez avatar Sep 06 '22 08:09 javifernandez

Since this change touches both, 'resources' and 'tools' folders it'd required an RFC proposal to be discussed and approved. See https://github.com/web-platform-tests/rfcs/pull/121 for details.

javifernandez avatar Sep 06 '22 09:09 javifernandez

Thanks for working on this, this seems like the right approach to me!

Any reason not to get rid of the manual tests at the same time?

I thought about it, tbh. They might be useful to try the codeapath of the Permission logic and user prompt. Additionally, they could be useful for the browser that implement the Custom Handlers API but not the WebDriver command (eg Firefox). Is this enough to keep all the manual tests ? I'm not sure; I trust your judgement on this regard.

javifernandez avatar Feb 09 '23 23:02 javifernandez

I guess that's fair. I worry a bit that they might not get maintained over time. I guess that would be easy enough to spot with git and we can make a call at that time what to do. And a lot of logic is shared which should reduce that issue as well.

annevk avatar Feb 17 '23 09:02 annevk

@annevk could you take another look at this PR ? Perhaps we can discuss again about what to do with the manual tests; I think they still have some value, since they test a different codepath and definitively the only option for browsers that don't implement the new WebDriver extension command (eg, Firefox).

javifernandez avatar Nov 15 '23 10:11 javifernandez

@domenic perhaps you could rubber-stamp the PR, given that these tests are designed for the registerProtocolHandler method of the HTML spec.

javifernandez avatar Nov 21 '23 14:11 javifernandez

@jgraham your input would be interesting as well, given that Gecko is the other engine that implements the registerProtocolHandler method.

javifernandez avatar Nov 21 '23 14:11 javifernandez

I'm sorry, I don't have time to review this PR. I see you already have an approval.

domenic avatar Nov 22 '23 01:11 domenic