• Alex Cooper's avatar
    Implement Input portions of webxr-test-api · 2cd325a0
    Alex Cooper authored
    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/+/1699505Reviewed-by: default avatarBill Orr <billorr@chromium.org>
    Commit-Queue: Alexander Cooper <alcooper@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#677061}
    2cd325a0
xr-internal-device-mocking.js 2.48 KB