web-platform-tests: Our implementation unfortunately doesn’t come with
web-platform-tests, for two reasons.  One is that there is currently no way
to mock user gestures in web platform tests [4], and the second reason is
that furthermore, our implementation also depends on being able to
manipulate the URL Classifier backend for testing purposes.

So this isn't true, however the present state of affairs may not yet be useful to you.

It is currently possible to make basic user actions in wpt using the testdriver API [1]. I am helping extend this to allow more general guestures via WebDriver-like actions [2].

However it sounds like in this case you may need to add test-only APIs for manipulating internal browser state. There are two possible approaches here:

* Add a feature to WebDriver for manipulating this data. This can be specified in the StorageManager spec and is appropriate if we want to add something that can be used by authors as part of the automated testing for their website.

* Add test-only DOM APIs in the StorageManager spec that we can enable when running the browser in test mode. Each browser would be expected to have some implementation-specific means to enable these APIs when under test (e.g. a pref). WebUSB has an example of this approach.

[4] https://github.com/web-platform-tests/wpt/issues/7156


[1] https://web-platform-tests.org/writing-tests/testdriver.html
[2] https://github.com/web-platform-tests/wpt/pull/12726
[3] https://wicg.github.io/webusb/test/
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to