Auto merge of #25463 - Manishearth:input-mocking, r=asajeffrey

Add input mocking, input sources change event

Depends on  https://github.com/servo/webxr/pull/118

Also fixes some bugs I found.

Wanted to finish and merge this before I started on hit testing since the transient hit test stuff might have overlap.

There are a bunch of missing mock pieces that I'll probably do in a separate PR.

Still need to run tests.

Some things I skipped:
 - Doing handedness/target ray setting: See https://github.com/immersive-web/webxr-test-api/issues/46 , this would require making our impl support these changing
 - Handling button initial state: Would require some mock changes, but I ran out of time
 - Handling profiles/etc: We don't yet have impl support for these

r? @jdm
This commit is contained in:
bors-servo 2020-01-09 02:45:49 -05:00 committed by GitHub
commit dbee7f7d27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 485 additions and 79 deletions

View file

@ -733547,7 +733547,7 @@
"testharness"
],
"webxr/xrInputSource_add_remove.https.html": [
"4c50670c70ec87754a777cc0bcfe8272e794ca07",
"33264ddd68ab09e2ed6a596614116bd1225f2665",
"testharness"
],
"webxr/xrInputSource_emulatedPosition.https.html": [

View file

@ -1,4 +1,5 @@
[events_input_source_recreation.https.html]
expected: ERROR
[Input sources are re-created when handedness or target ray mode changes]
expected: FAIL

View file

@ -1,4 +0,0 @@
[events_session_select.https.html]
[XRInputSources primary input presses properly fires off the right events]
expected: FAIL

View file

@ -1,4 +0,0 @@
[events_session_select_subframe.https.html]
[Ensures that an XRInputSources primary input being pressed and released in the space of a single frame properly fires off the right events]
expected: FAIL

View file

@ -1,4 +1,5 @@
[xrInputSource_gamepad_disconnect.https.html]
expected: ERROR
[WebXR InputSource's gamepad gets disconnected when the input source is removed]
expected: FAIL

View file

@ -1,4 +1,5 @@
[xrInputSource_gamepad_input_registered.https.html]
expected: ERROR
[WebXR InputSource's gamepad properly registers input]
expected: FAIL

View file

@ -1,4 +1,5 @@
[getInputPose_handedness.https.html]
expected: ERROR
[XRInputSources properly communicate their handedness]
expected: FAIL
expected: TIMEOUT

View file

@ -2,21 +2,12 @@
[XR interface: attribute ondevicechange]
expected: FAIL
[XRInputSourcesChangeEvent interface: attribute session]
expected: FAIL
[XRInputSourcesChangeEvent interface object name]
expected: FAIL
[XRInputSourceArray interface: iterable<XRInputSource>]
expected: FAIL
[XR interface: calling supportsSession(XRSessionMode) on navigator.xr with too few arguments must throw TypeError]
expected: FAIL
[XRInputSourcesChangeEvent interface object length]
expected: FAIL
[XRReferenceSpaceEvent interface: attribute referenceSpace]
expected: FAIL
@ -32,9 +23,6 @@
[XRPose interface: attribute emulatedPosition]
expected: FAIL
[XRInputSource interface: attribute targetRayMode]
expected: FAIL
[XRBoundedReferenceSpace interface object length]
expected: FAIL
@ -50,15 +38,9 @@
[WebGLRenderingContext interface: operation makeXRCompatible()]
expected: FAIL
[XRInputSourcesChangeEvent interface: attribute added]
expected: FAIL
[XRBoundedReferenceSpace interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[XRInputSourcesChangeEvent interface: attribute removed]
expected: FAIL
[XRReferenceSpaceEvent interface: existence and properties of interface object]
expected: FAIL
@ -83,9 +65,6 @@
[XRBoundedReferenceSpace interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[XRInputSourcesChangeEvent interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[XRBoundedReferenceSpace interface: attribute boundsGeometry]
expected: FAIL
@ -98,12 +77,6 @@
[XRInputSource interface: attribute gamepad]
expected: FAIL
[XRInputSourcesChangeEvent interface: existence and properties of interface prototype object]
expected: FAIL
[XRInputSourcesChangeEvent interface: existence and properties of interface object]
expected: FAIL
[XRReferenceSpace interface: attribute onreset]
expected: FAIL
@ -125,9 +98,6 @@
[XRInputSource interface: attribute profiles]
expected: FAIL
[XRInputSourcesChangeEvent interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[XR interface: operation requestSession(XRSessionMode, XRSessionInit)]
expected: FAIL
@ -140,9 +110,6 @@
[XRWebGLLayer interface: attribute ignoreDepthValues]
expected: FAIL
[XRSession interface: attribute oninputsourceschange]
expected: FAIL
[XRBoundedReferenceSpace interface: existence and properties of interface prototype object]
expected: FAIL

View file

@ -1,4 +0,0 @@
[xrInputSource_add_remove.https.html]
[XRInputSources can be properly added and removed from the session]
expected: FAIL

View file

@ -1,4 +0,0 @@
[xrInputSource_sameObject.https.html]
[XRInputSource attributes meet [SameObject\] requirement]
expected: FAIL

View file

@ -1,4 +0,0 @@
[xrPose_transform_sameObject.https.html]
[XRPose.transform meets [SameObject\] requirement]
expected: FAIL

View file

@ -1,4 +1,5 @@
[xrReferenceSpace_originOffsetBounded.https.html]
expected: ERROR
[Updating XRBoundedReferenceSpace origin offset updates view, input matrices, and bounds geometry.]
expected: FAIL
expected: TIMEOUT

View file

@ -1,4 +1,5 @@
[xrSession_sameObject.https.html]
expected: ERROR
[XRSession attributes meet [SameObject\] requirement]
expected: FAIL
expected: TIMEOUT

View file

@ -46,7 +46,7 @@ let testFunction = (session, fakeDeviceController, t) => new Promise((resolve) =
assert_equals(input_sources[1].handedness, "none");
});
fakeDeviceController.removeInputSource(input_source_1);
input_source_1.disconnect();
session.requestAnimationFrame((time, xrFrame) => {
let input_sources = session.inputSources;