diff options
Diffstat (limited to 'tests/wpt/web-platform-tests/resources/chromium/webxr-test.js')
-rw-r--r-- | tests/wpt/web-platform-tests/resources/chromium/webxr-test.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/wpt/web-platform-tests/resources/chromium/webxr-test.js b/tests/wpt/web-platform-tests/resources/chromium/webxr-test.js index eae4d64b446..df91abf6d7f 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/webxr-test.js +++ b/tests/wpt/web-platform-tests/resources/chromium/webxr-test.js @@ -268,6 +268,7 @@ class MockRuntime { this.pose_ = { orientation: { x: q[0], y: q[1], z: q[2], w: q[3] }, position: { x: p[0], y: p[1], z: p[2] }, + emulatedPosition: emulatedPosition, angularVelocity: null, linearVelocity: null, angularAcceleration: null, @@ -573,7 +574,7 @@ class MockRuntime { let submit_frame_sink; if (result.supportsSession) { submit_frame_sink = { - clientRequest: this.presentation_provider_.getClientRequest(), + clientReceiver: this.presentation_provider_.getClientReceiver(), provider: this.presentation_provider_.bindProvider(sessionOptions), transportOptions: options }; @@ -583,7 +584,7 @@ class MockRuntime { this.dataProviderBinding_ = new mojo.Binding( device.mojom.XRFrameDataProvider, this, dataProviderRequest); - let clientRequest = mojo.makeRequest(this.sessionClient_); + let clientReceiver = mojo.makeRequest(this.sessionClient_); let enabled_features = []; for(let i = 0; i < sessionOptions.requiredFeatures.length; i++) { @@ -604,7 +605,7 @@ class MockRuntime { session: { submitFrameSink: submit_frame_sink, dataProvider: dataProviderPtr, - clientRequest: clientRequest, + clientReceiver: clientReceiver, displayInfo: this.displayInfo_, enabledFeatures: enabled_features, } @@ -691,6 +692,7 @@ class MockXRInputSource { this.desc_dirty_ = true; this.pointer_offset_ = new gfx.mojom.Transform(); this.pointer_offset_.matrix = getMatrixFromTransform(transform); + this.emulated_position_ = emulatedPosition; } disconnect() { @@ -812,11 +814,11 @@ class MockXRInputSource { input_state.gamepad = this.gamepad_; + input_state.emulatedPosition = this.emulated_position_; + if (this.desc_dirty_) { let input_desc = new device.mojom.XRInputSourceDescription(); - input_desc.emulatedPosition = this.emulated_position_; - switch (this.target_ray_mode_) { case 'gaze': input_desc.targetRayMode = device.mojom.XRTargetRayMode.GAZING; @@ -955,7 +957,7 @@ class MockXRPresentationProvider { return providerPtr; } - getClientRequest() { + getClientReceiver() { this.submitFrameClient_ = new device.mojom.XRPresentationClientPtr(); return mojo.makeRequest(this.submitFrameClient_); } |