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

Implement Input portions of webxr-test-api #17810

Merged
merged 1 commit into from Jul 12, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jul 12, 2019

This change implements the input related portions of the webxr-test-api
and updates internal tests to use those methods/constants/inits.
Most of the logic is ported from xr-internal-device-mocking.js and just
converted from attributes to a pair of set/clear properties. No tests
were actually using the getters, so those were just deleted. Because
the webxr-test-api does not yet support gamepads, all of that logic was
left in the internal mock.

It also forces/fixes a potential bug where a device with no inputs may
opt to set the "InputStates" value of the mojom to null rather than an
empty array. (The device code typically sets this to an empty array)

Rather than risk losing/confusing the diff to the updated tests, future
work will move these tests to the external WPTs

Bug: 979318
Change-Id: I846831a561217abd66ab841326a5e5472f38afeb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1699505
Reviewed-by: Bill Orr <billorr@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677061}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

Already reviewed downstream.

This change implements the input related portions of the webxr-test-api
and updates internal tests to use those methods/constants/inits.
Most of the logic is ported from xr-internal-device-mocking.js and just
converted from attributes to a pair of set/clear properties.  No tests
were actually using the getters, so those were just deleted.  Because
the webxr-test-api does not yet support gamepads, all of that logic was
left in the internal mock.

It also forces/fixes a potential bug where a device with no inputs may
opt to set the "InputStates" value of the mojom to null rather than an
empty array. (The device code typically sets this to an empty array)

Rather than risk losing/confusing the diff to the updated tests, future
work will move these tests to the external WPTs

Bug: 979318
Change-Id: I846831a561217abd66ab841326a5e5472f38afeb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1699505
Reviewed-by: Bill Orr <billorr@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677061}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants