-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
No way to test sensor APIs #9686
Comments
https://crbug.com/816462 is a Chromium tracking issue. |
@foolip, many thanks for getting this started. Indeed, many depth tests for sensor are blocked by this, e.g. use mock data to verify sensor readings, disable/disallow sensor to track |
Fix for Chromium https://chromium-review.googlesource.com/c/chromium/src/+/980886 |
Thread at https://chromium-review.googlesource.com/c/chromium/src/+/980886/2/third_party/WebKit/LayoutTests/external/wpt/generic-sensor/generic-sensor-tests.js#38 is relevant to where we should go with this, and I've poked @kereliuk there. What I think and hope is that the final solution can be something like:
@agouaillard do you have a draft of the media device mocking API that we could model the WebDriver bits on? |
Here is an example of what an existing WebDriver extension looks like: https://w3c.github.io/permissions/#automation We would need to specify an API and get WebDriver implementors to sign off on it. What Phillip has suggested above is the course of action I would agree with :) |
This patch introduces mock implementations of the Sensor and SensorProvider mojo interfaces to the WPT tests for Chromium. The ongoing WPT issue for the Generic Sensor tests automation: #9686 Bug: 816462 Change-Id: I8e4880ee5269b07f0bf68a2752038e128d166c55
This patch introduces mock implementations of the Sensor and SensorProvider mojo interfaces to the WPT tests for Chromium. The ongoing WPT issue for the Generic Sensor tests automation: #9686 Bug: 816462 Change-Id: I8e4880ee5269b07f0bf68a2752038e128d166c55
This patch introduces mock implementations of the Sensor and SensorProvider mojo interfaces to the WPT tests for Chromium. The ongoing WPT issue for the Generic Sensor tests automation: web-platform-tests/wpt#9686 Bug: 816462 Change-Id: I8e4880ee5269b07f0bf68a2752038e128d166c55 Reviewed-on: https://chromium-review.googlesource.com/980886 Reviewed-by: Mike West <[email protected]> Reviewed-by: Philip Jägenstedt <[email protected]> Reviewed-by: Reilly Grant <[email protected]> Reviewed-by: Alexander Shalamov <[email protected]> Commit-Queue: Mikhail Pozdnyakov <[email protected]> Cr-Commit-Position: refs/heads/master@{#550586}
This patch introduces mock implementations of the Sensor and SensorProvider mojo interfaces to the WPT tests for Chromium. The ongoing WPT issue for the Generic Sensor tests automation: #9686 Bug: 816462 Change-Id: I8e4880ee5269b07f0bf68a2752038e128d166c55 Reviewed-on: https://chromium-review.googlesource.com/980886 Reviewed-by: Mike West <[email protected]> Reviewed-by: Philip Jägenstedt <[email protected]> Reviewed-by: Reilly Grant <[email protected]> Reviewed-by: Alexander Shalamov <[email protected]> Commit-Queue: Mikhail Pozdnyakov <[email protected]> Cr-Commit-Position: refs/heads/master@{#550586}
This patch introduces mock implementations of the Sensor and SensorProvider mojo interfaces to the WPT tests for Chromium. The ongoing WPT issue for the Generic Sensor tests automation: #9686 Bug: 816462 Change-Id: I8e4880ee5269b07f0bf68a2752038e128d166c55 Reviewed-on: https://chromium-review.googlesource.com/980886 Reviewed-by: Mike West <[email protected]> Reviewed-by: Philip Jägenstedt <[email protected]> Reviewed-by: Reilly Grant <[email protected]> Reviewed-by: Alexander Shalamov <[email protected]> Commit-Queue: Mikhail Pozdnyakov <[email protected]> Cr-Commit-Position: refs/heads/master@{#550586}
This patch introduces mock implementations of the Sensor and SensorProvider mojo interfaces to the WPT tests for Chromium. The ongoing WPT issue for the Generic Sensor tests automation: #9686 Bug: 816462 Change-Id: I8e4880ee5269b07f0bf68a2752038e128d166c55 Reviewed-on: https://chromium-review.googlesource.com/980886 Reviewed-by: Mike West <[email protected]> Reviewed-by: Philip Jägenstedt <[email protected]> Reviewed-by: Reilly Grant <[email protected]> Reviewed-by: Alexander Shalamov <[email protected]> Commit-Queue: Mikhail Pozdnyakov <[email protected]> Cr-Commit-Position: refs/heads/master@{#550586}
This patch introduces mock implementations of the Sensor and SensorProvider mojo interfaces to the WPT tests for Chromium. The ongoing WPT issue for the Generic Sensor tests automation: #9686 Bug: 816462 Change-Id: I8e4880ee5269b07f0bf68a2752038e128d166c55 Reviewed-on: https://chromium-review.googlesource.com/980886 Reviewed-by: Mike West <[email protected]> Reviewed-by: Philip Jägenstedt <[email protected]> Reviewed-by: Reilly Grant <[email protected]> Reviewed-by: Alexander Shalamov <[email protected]> Commit-Queue: Mikhail Pozdnyakov <[email protected]> Cr-Commit-Position: refs/heads/master@{#550586}
This patch introduces mock implementations of the Sensor and SensorProvider mojo interfaces to the WPT tests for Chromium. The ongoing WPT issue for the Generic Sensor tests automation: #9686 Bug: 816462 Change-Id: I8e4880ee5269b07f0bf68a2752038e128d166c55 Reviewed-on: https://chromium-review.googlesource.com/980886 Reviewed-by: Mike West <[email protected]> Reviewed-by: Philip Jägenstedt <[email protected]> Reviewed-by: Reilly Grant <[email protected]> Reviewed-by: Alexander Shalamov <[email protected]> Commit-Queue: Mikhail Pozdnyakov <[email protected]> Cr-Commit-Position: refs/heads/master@{#550586}
This patch introduces mock implementations of the Sensor and SensorProvider mojo interfaces to the WPT tests for Chromium. The ongoing WPT issue for the Generic Sensor tests automation: #9686 Bug: 816462 Change-Id: I8e4880ee5269b07f0bf68a2752038e128d166c55 Reviewed-on: https://chromium-review.googlesource.com/980886 Reviewed-by: Mike West <[email protected]> Reviewed-by: Philip Jägenstedt <[email protected]> Reviewed-by: Reilly Grant <[email protected]> Reviewed-by: Alexander Shalamov <[email protected]> Commit-Queue: Mikhail Pozdnyakov <[email protected]> Cr-Commit-Position: refs/heads/master@{#550586}
…classes, a=testonly Automatic update from web-platform-testsEnable WPT tests for the Generic Sensor classes This patch introduces mock implementations of the Sensor and SensorProvider mojo interfaces to the WPT tests for Chromium. The ongoing WPT issue for the Generic Sensor tests automation: web-platform-tests/wpt#9686 Bug: 816462 Change-Id: I8e4880ee5269b07f0bf68a2752038e128d166c55 Reviewed-on: https://chromium-review.googlesource.com/980886 Reviewed-by: Mike West <[email protected]> Reviewed-by: Philip Jägenstedt <[email protected]> Reviewed-by: Reilly Grant <[email protected]> Reviewed-by: Alexander Shalamov <[email protected]> Commit-Queue: Mikhail Pozdnyakov <[email protected]> Cr-Commit-Position: refs/heads/master@{#550586} -- wpt-commits: b55a93ab1fa441d8998fcfb1173d00dab4b733c0 wpt-pr: 10198
…classes, a=testonly Automatic update from web-platform-testsEnable WPT tests for the Generic Sensor classes This patch introduces mock implementations of the Sensor and SensorProvider mojo interfaces to the WPT tests for Chromium. The ongoing WPT issue for the Generic Sensor tests automation: web-platform-tests/wpt#9686 Bug: 816462 Change-Id: I8e4880ee5269b07f0bf68a2752038e128d166c55 Reviewed-on: https://chromium-review.googlesource.com/980886 Reviewed-by: Mike West <[email protected]> Reviewed-by: Philip Jägenstedt <[email protected]> Reviewed-by: Reilly Grant <[email protected]> Reviewed-by: Alexander Shalamov <[email protected]> Commit-Queue: Mikhail Pozdnyakov <[email protected]> Cr-Commit-Position: refs/heads/master@{#550586} -- wpt-commits: b55a93ab1fa441d8998fcfb1173d00dab4b733c0 wpt-pr: 10198
@Honry has a PR for this in the spec at w3c/sensors#369. |
…classes, a=testonly Automatic update from web-platform-testsEnable WPT tests for the Generic Sensor classes This patch introduces mock implementations of the Sensor and SensorProvider mojo interfaces to the WPT tests for Chromium. The ongoing WPT issue for the Generic Sensor tests automation: web-platform-tests/wpt#9686 Bug: 816462 Change-Id: I8e4880ee5269b07f0bf68a2752038e128d166c55 Reviewed-on: https://chromium-review.googlesource.com/980886 Reviewed-by: Mike West <mkwstchromium.org> Reviewed-by: Philip Jägenstedt <foolipchromium.org> Reviewed-by: Reilly Grant <reillygchromium.org> Reviewed-by: Alexander Shalamov <alexander.shalamovintel.com> Commit-Queue: Mikhail Pozdnyakov <mikhail.pozdnyakovintel.com> Cr-Commit-Position: refs/heads/master{#550586} -- wpt-commits: b55a93ab1fa441d8998fcfb1173d00dab4b733c0 wpt-pr: 10198 UltraBlame original commit: b8ae1c026c8a586bd2afc5d66e9eb0e75062fb59
…classes, a=testonly Automatic update from web-platform-testsEnable WPT tests for the Generic Sensor classes This patch introduces mock implementations of the Sensor and SensorProvider mojo interfaces to the WPT tests for Chromium. The ongoing WPT issue for the Generic Sensor tests automation: web-platform-tests/wpt#9686 Bug: 816462 Change-Id: I8e4880ee5269b07f0bf68a2752038e128d166c55 Reviewed-on: https://chromium-review.googlesource.com/980886 Reviewed-by: Mike West <mkwstchromium.org> Reviewed-by: Philip Jägenstedt <foolipchromium.org> Reviewed-by: Reilly Grant <reillygchromium.org> Reviewed-by: Alexander Shalamov <alexander.shalamovintel.com> Commit-Queue: Mikhail Pozdnyakov <mikhail.pozdnyakovintel.com> Cr-Commit-Position: refs/heads/master{#550586} -- wpt-commits: b55a93ab1fa441d8998fcfb1173d00dab4b733c0 wpt-pr: 10198 UltraBlame original commit: b8ae1c026c8a586bd2afc5d66e9eb0e75062fb59
…classes, a=testonly Automatic update from web-platform-testsEnable WPT tests for the Generic Sensor classes This patch introduces mock implementations of the Sensor and SensorProvider mojo interfaces to the WPT tests for Chromium. The ongoing WPT issue for the Generic Sensor tests automation: web-platform-tests/wpt#9686 Bug: 816462 Change-Id: I8e4880ee5269b07f0bf68a2752038e128d166c55 Reviewed-on: https://chromium-review.googlesource.com/980886 Reviewed-by: Mike West <mkwstchromium.org> Reviewed-by: Philip Jägenstedt <foolipchromium.org> Reviewed-by: Reilly Grant <reillygchromium.org> Reviewed-by: Alexander Shalamov <alexander.shalamovintel.com> Commit-Queue: Mikhail Pozdnyakov <mikhail.pozdnyakovintel.com> Cr-Commit-Position: refs/heads/master{#550586} -- wpt-commits: b55a93ab1fa441d8998fcfb1173d00dab4b733c0 wpt-pr: 10198 UltraBlame original commit: b8ae1c026c8a586bd2afc5d66e9eb0e75062fb59
Spec PR: w3c/sensors#470 The Generic Sensor spec used to have an Automation section, but it leaked implementation-specific details and was not implemented anywhere. The changes above have been implemented in Chromium and there are pending patches there to convert the existing Generic Sensor web tests in WPT to the new virtual sensor model, which entirely removes the dependency on Mojo mocks and makes the tests more interoperable. This PR adds the required infrastructure to manipulate virtual sensors from testdriver. The 4 new commands correspond to the 4 WebDriver extension commands added by the spec PR above. This change was co-authored with @JuhaVainio. Related to web-platform-tests#9686.
Spec PR: w3c/sensors#470 The Generic Sensor spec used to have an Automation section, but it leaked implementation-specific details and was not implemented anywhere. The changes above have been implemented in Chromium and there are pending patches there to convert the existing Generic Sensor web tests in WPT to the new virtual sensor model, which entirely removes the dependency on Mojo mocks and makes the tests more interoperable. This PR adds the required infrastructure to manipulate virtual sensors from testdriver. The 4 new commands correspond to the 4 WebDriver extension commands added by the spec PR above. This change was co-authored with @JuhaVainio. Related to web-platform-tests#9686.
Spec PR: w3c/sensors#470 The Generic Sensor spec used to have an Automation section, but it leaked implementation-specific details and was not implemented anywhere. The changes above have been implemented in Chromium and there are pending patches there to convert the existing Generic Sensor web tests in WPT to the new virtual sensor model, which entirely removes the dependency on Mojo mocks and makes the tests more interoperable. This PR adds the required infrastructure to manipulate virtual sensors from testdriver. The 4 new commands correspond to the 4 WebDriver extension commands added by the spec PR above. This change was co-authored with @JuhaVainio. Related to web-platform-tests#9686.
Spec PR: w3c/sensors#470 The Generic Sensor spec used to have an Automation section, but it leaked implementation-specific details and was not implemented anywhere. The changes above have been implemented in Chromium and there are pending patches there to convert the existing Generic Sensor web tests in WPT to the new virtual sensor model, which entirely removes the dependency on Mojo mocks and makes the tests more interoperable. This PR adds the required infrastructure to manipulate virtual sensors from testdriver. The 4 new commands correspond to the 4 WebDriver extension commands added by the spec PR above. This change was co-authored with @JuhaVainio. Related to web-platform-tests#9686.
Spec PR: w3c/sensors#470 The Generic Sensor spec used to have an Automation section, but it leaked implementation-specific details and was not implemented anywhere. The changes above have been implemented in Chromium and there are pending patches there to convert the existing Generic Sensor web tests in WPT to the new virtual sensor model, which entirely removes the dependency on Mojo mocks and makes the tests more interoperable. This PR adds the required infrastructure to manipulate virtual sensors from testdriver. The 4 new commands correspond to the 4 WebDriver extension commands added by the spec PR above. This change was co-authored with @JuhaVainio. Related to web-platform-tests#9686.
Spec PR: w3c/sensors#470 The Generic Sensor spec used to have an Automation section, but it leaked implementation-specific details and was not implemented anywhere. The changes above have been implemented in Chromium and there are pending patches there to convert the existing Generic Sensor web tests in WPT to the new virtual sensor model, which entirely removes the dependency on Mojo mocks and makes the tests more interoperable. This PR adds the required infrastructure to manipulate virtual sensors from testdriver. The 4 new commands correspond to the 4 WebDriver extension commands added by the spec PR above. This change was co-authored with @JuhaVainio. Related to web-platform-tests#9686.
Spec PR: w3c/sensors#470 The Generic Sensor spec used to have an Automation section, but it leaked implementation-specific details and was not implemented anywhere. The changes above have been implemented in Chromium and there are pending patches there to convert the existing Generic Sensor web tests in WPT to the new virtual sensor model, which entirely removes the dependency on Mojo mocks and makes the tests more interoperable. This PR adds the required infrastructure to manipulate virtual sensors from testdriver. The 4 new commands correspond to the 4 WebDriver extension commands added by the spec PR above. This change was co-authored with @JuhaVainio. Related to web-platform-tests#9686.
Spec PR: w3c/sensors#470 The Generic Sensor spec used to have an Automation section, but it leaked implementation-specific details and was not implemented anywhere. The changes above have been implemented in Chromium and there are pending patches there to convert the existing Generic Sensor web tests in WPT to the new virtual sensor model, which entirely removes the dependency on Mojo mocks and makes the tests more interoperable. This PR adds the required infrastructure to manipulate virtual sensors from testdriver. The 4 new commands correspond to the 4 WebDriver extension commands added by the spec PR above. This change was co-authored with @JuhaVainio. Related to web-platform-tests#9686.
Spec PR: w3c/sensors#470 The Generic Sensor spec used to have an Automation section, but it leaked implementation-specific details and was not implemented anywhere. The changes above have been implemented in Chromium and there are pending patches there to convert the existing Generic Sensor web tests in WPT to the new virtual sensor model, which entirely removes the dependency on Mojo mocks and makes the tests more interoperable. This PR adds the required infrastructure to manipulate virtual sensors from testdriver. The 4 new commands correspond to the 4 WebDriver extension commands added by the spec PR above. This change was co-authored with @JuhaVainio. Related to #9686.
This was originally part of web-platform-tests#41906, but these tests are being landed separately because they depend on the corresponding ChromeDriver bits that have since landed. Co-authored with @JuhaVainio, related to web-platform-tests#9686.
I'm happy to report that with #41906, w3c/sensors#470 (and related spec changes) and the Chromium work done in https://crbug.com/1278377 the Generic Sensor tests have been rewritten and no longer depend on Mojo and rely solely on (classic) WebDriver extension commands that are fully specified in the Generic Sensor API spec 🎉 |
https://w3c.github.io/sensors/
https://w3c.github.io/accelerometer/
https://w3c.github.io/gyroscope/
https://w3c.github.io/orientation-sensor/
These specs and any additional sensor specs cannot be tested in any depth without additional APIs. This was recently discussed in w3c/sensors#257 (comment).
In Chromium there are tests for some of this that need some kind of wpt-side work to be shareable:
https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/sensor/
That'd be either the mojo mocking approach used by Bluetooth and USB, or something else. These APIs are fairly simple (one-way flow of data) so it might not be too hard to define a WebDriver API and wrap it with testdriver.js. @kereliuk FYI.
The text was updated successfully, but these errors were encountered: