Skip to content
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

Closed
foolip opened this issue Feb 27, 2018 · 7 comments
Closed

No way to test sensor APIs #9686

foolip opened this issue Feb 27, 2018 · 7 comments

Comments

@foolip
Copy link
Member

foolip commented Feb 27, 2018

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.

@foolip
Copy link
Member Author

foolip commented Feb 27, 2018

https://crbug.com/816462 is a Chromium tracking issue.

@Honry
Copy link
Contributor

Honry commented Feb 27, 2018

@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 onerror event, etc.

@pozdnyakov
Copy link
Contributor

@foolip
Copy link
Member Author

foolip commented Apr 6, 2018

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?

@kereliuk
Copy link
Contributor

kereliuk commented Apr 6, 2018

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 :)

chromium-wpt-export-bot pushed a commit that referenced this issue Apr 11, 2018
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
chromium-wpt-export-bot pushed a commit that referenced this issue Apr 11, 2018
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
aarongable pushed a commit to chromium/chromium that referenced this issue Apr 13, 2018
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}
chromium-wpt-export-bot pushed a commit that referenced this issue Apr 13, 2018
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}
foolip pushed a commit that referenced this issue Apr 27, 2018
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}
foolip pushed a commit that referenced this issue May 8, 2018
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}
foolip pushed a commit that referenced this issue May 8, 2018
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}
foolip pushed a commit that referenced this issue May 8, 2018
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}
foolip pushed a commit that referenced this issue May 8, 2018
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}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue May 16, 2018
…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
mcmanus pushed a commit to mcmanus/gecko that referenced this issue May 17, 2018
…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
@foolip
Copy link
Member Author

foolip commented Sep 10, 2018

@Honry has a PR for this in the spec at w3c/sensors#369.

gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 3, 2019
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 3, 2019
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 3, 2019
…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
@rakuco rakuco self-assigned this Jun 9, 2023
rakuco pushed a commit to rakuco/wpt that referenced this issue Sep 11, 2023
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.
rakuco pushed a commit to rakuco/wpt that referenced this issue Sep 12, 2023
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.
rakuco pushed a commit to rakuco/wpt that referenced this issue Sep 12, 2023
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.
rakuco pushed a commit to rakuco/wpt that referenced this issue Sep 12, 2023
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.
rakuco pushed a commit to rakuco/wpt that referenced this issue Oct 10, 2023
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.
rakuco pushed a commit to rakuco/wpt that referenced this issue Oct 10, 2023
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.
rakuco pushed a commit to rakuco/wpt that referenced this issue Oct 10, 2023
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.
rakuco pushed a commit to rakuco/wpt that referenced this issue Oct 10, 2023
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.
past pushed a commit that referenced this issue Oct 21, 2023
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.
rakuco pushed a commit to rakuco/wpt that referenced this issue Nov 1, 2023
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.
@rakuco
Copy link
Member

rakuco commented Nov 16, 2023

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 🎉

@rakuco rakuco closed this as completed Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants