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

sensors: Add virtual sensor-related commands to testdriver #41906

Merged

Conversation

rakuco
Copy link
Member

@rakuco rakuco commented 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 #9686.

@rakuco rakuco requested a review from reillyeon September 11, 2023 09:15
@rakuco rakuco requested a review from a team as a code owner September 11, 2023 09:15
@wpt-pr-bot wpt-pr-bot added docs infra testdriver.js wptrunner The automated test runner, commonly called through ./wpt run labels Sep 11, 2023
@rakuco rakuco force-pushed the sensors/add-virtual-sensor-support branch 3 times, most recently from a4494a3 to a09b779 Compare September 12, 2023 13:38
@sideshowbarker sideshowbarker removed their request for review September 13, 2023 04:22
@sideshowbarker sideshowbarker removed their assignment Sep 13, 2023
resources/testdriver.js Outdated Show resolved Hide resolved
@rakuco rakuco force-pushed the sensors/add-virtual-sensor-support branch from a09b779 to 143c222 Compare October 10, 2023 11:02
@rakuco rakuco force-pushed the sensors/add-virtual-sensor-support branch 2 times, most recently from 3e8ef2c to 0dd2d80 Compare October 10, 2023 11:04
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 rakuco force-pushed the sensors/add-virtual-sensor-support branch from 0dd2d80 to fd100e9 Compare October 10, 2023 19:35
@rakuco
Copy link
Member Author

rakuco commented Oct 10, 2023

CI was failing because the newly-added infrastructure/testdriver/virtual_sensors.https.html depended on support for the new commands in ChromeDriver. It's kind of a circular dependency because the CL adding ChromeDriver support is being reviewed and comes after a CL adding the content_shell code path (which depends on the testdriver.js changes here).

I've pushed a new version without that new test, which I intend to land separately later.

@rakuco
Copy link
Member Author

rakuco commented Oct 10, 2023

@web-platform-tests/wpt-core-team could someone take a look at this one?

@rakuco
Copy link
Member Author

rakuco commented Oct 18, 2023

@foolip @past could either of you rubber-stamp this PR?

Copy link
Member

@past past left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@past past merged commit 52115b2 into web-platform-tests:master Oct 21, 2023
@rakuco rakuco deleted the sensors/add-virtual-sensor-support branch October 22, 2023 21:29
@rakuco
Copy link
Member Author

rakuco commented Oct 23, 2023

LGTM

Thank you!

rakuco pushed a commit to rakuco/wpt that referenced this pull request 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs infra testdriver.js webdriver-bidi wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants