-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Presentation Testing API #440
Comments
Looping in @foolip with whom I've discussed the challenges of manual w-p-t testing of device APIs, particularly Vibration API and Battery Status API. @Honry has been championing the said test suites recently, and may also have some ideas for improvement to the manual testing of Presentation API. This might be another good concrete case to discuss in the web-platform-tests breakout session at TPAC on Wednesday. Or perhaps manual testing challenges would warrant a separate breakout session. |
+1. The reasons are:
|
@mfoltzgoogle just one question if we allow to create a fake presentation for testing purposes it is still the same underlying implementation of the API in Browser? we need to make sure that the behaviour of the API when presenting on real display is the same as when presenting on a fake display. |
@louaybassbouss The Presentation API implementation in Chrome consists of multiple layers spread across different process types. Chrome runs Web Platform Tests on the content/ layer, which (in Chrome) excludes any device-specific logic. The "fake" screen would have to be implemented in content/; so parts of the implementation of the Presentation API would be shared between "real" screens and "fake" screens. Others would not. As part of supporting "fake" screens, we may decide to move more of the implementation into content/ to avoid having to duplicate the logic between "real" and "fake" screens. This would improve test coverage for those aspects of the implementation. I can provide more concrete feedback once we have a proposal for the functionality of a "fake" screen. |
I took a quick look at the status of similar APIs that require some device mocking behavior.
This thread from blink-dev is also relevant to the status of these tests from May of this year. There was some more discussion and a follow-up call in earlier this year on the Test Infrastructure list, specifically about the WebUSB proposal. |
I think the logical next step here is to define the requirements and IDL for a testing API, similar to WebUSB. The initial scope I will look at is supporting cross-browser automation of Web Platform Tests. I'll just post it to this issue for discussion (not starting a formal document or anything.) |
Here is a draft of what I am thinking to start discussion. I think they will allow conversion of the manual Presentation API tests to automated, but I may have missed something. PTAL. https://github.com/mfoltzgoogle/presentation-test-api/blob/master/presentation_test_api.md I am not committed to any particular implementation; there has been some discussion of implementing testing APIs on top of WebDriver, versus bindings to native implementations. |
As we're talking about a new API (or WebDriver) surface, I'm marking this as a v2 feature. It's also a higher priority work item for us. |
@mfoltzgoogle, as of yesterday http://web-platform-tests.org/writing-tests/testdriver.html is an option as well. That requires first defining a WebDriver API, and then wrapping it in something that's ergonomic when writing tests. The upside is that web developers will also get the capabilities. That being said, a JS API that's enabled by WebDriver is also an option, if the API is too complex to represent as a WebDriver API. @JKereliuk might be able to give further advise. |
From https://www.w3.org/2017/11/06-webscreens-minutes.html#x13:
|
Currently a good portion of our web platform tests require manual intervention. This task tracks the work to implement a testing API to allow the tests to:
We should consider prior work by WebVR and other device APIs here around testing APIs.
The text was updated successfully, but these errors were encountered: