From 3a6ad959157201116e17ad96b030c23122fc0335 Mon Sep 17 00:00:00 2001 From: Daosheng Mu Date: Wed, 26 Apr 2017 13:17:25 +0800 Subject: [PATCH] Bug 1355648 - Part 3: Set position and orientation IsValid properties for GamepadPose tests; r=kip MozReview-Commit-ID: 29sjo3yhg98 --HG-- extra : rebase_source : afb483713a3e895d81e20d4d8dc3861679f1781e --- dom/gamepad/GamepadServiceTest.cpp | 2 ++ dom/vr/VRServiceTest.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/dom/gamepad/GamepadServiceTest.cpp b/dom/gamepad/GamepadServiceTest.cpp index ec321315e170..a1bd71a71cf2 100644 --- a/dom/gamepad/GamepadServiceTest.cpp +++ b/dom/gamepad/GamepadServiceTest.cpp @@ -260,6 +260,7 @@ GamepadServiceTest::NewPoseMove(uint32_t aIndex, poseState.orientation[1] = value.Data()[1]; poseState.orientation[2] = value.Data()[2]; poseState.orientation[3] = value.Data()[3]; + poseState.isOrientationValid = true; } if (!aPos.IsNull()) { const Float32Array& value = aPos.Value(); @@ -268,6 +269,7 @@ GamepadServiceTest::NewPoseMove(uint32_t aIndex, poseState.position[0] = value.Data()[0]; poseState.position[1] = value.Data()[1]; poseState.position[2] = value.Data()[2]; + poseState.isPositionValid = true; } if (!aAngVelocity.IsNull()) { const Float32Array& value = aAngVelocity.Value(); diff --git a/dom/vr/VRServiceTest.cpp b/dom/vr/VRServiceTest.cpp index 13bd0ef22198..1f0ddba46cd4 100644 --- a/dom/vr/VRServiceTest.cpp +++ b/dom/vr/VRServiceTest.cpp @@ -212,6 +212,7 @@ VRMockController::NewPoseMove(const Nullable& aPosition, poseState.orientation[1] = value.Data()[1]; poseState.orientation[2] = value.Data()[2]; poseState.orientation[3] = value.Data()[3]; + poseState.isOrientationValid = true; } if (!aPosition.IsNull()) { const Float32Array& value = aPosition.Value(); @@ -220,6 +221,7 @@ VRMockController::NewPoseMove(const Nullable& aPosition, poseState.position[0] = value.Data()[0]; poseState.position[1] = value.Data()[1]; poseState.position[2] = value.Data()[2]; + poseState.isPositionValid = true; } if (!aAngularVelocity.IsNull()) { const Float32Array& value = aAngularVelocity.Value();