Backed out the accidental backout of the backout of 3 changesets (bug 1311802). r=backout/reland
authorIris Hsiao <ihsiao@mozilla.com>
Fri, 31 Mar 2017 10:11:19 +0200
changeset 350689 07452c042af0715b8c4361261f10d6535a381434
parent 350688 295df6974eba1bc264861003ee49cc16040429a0
child 350690 bb2b3077d33974f7838898b4297646276e4aed42
push id88685
push usercbook@mozilla.com
push dateFri, 31 Mar 2017 12:48:11 +0000
treeherdermozilla-inbound@aece477a513e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout, reland
bugs1311802
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out the accidental backout of the backout of 3 changesets (bug 1311802). r=backout/reland Backed out changeset 44bd57c9340f (bug 1311802) Backed out changeset 4bb94cbb9a24 (bug 1311802) Backed out changeset 15d9c5895041 (bug 1311802)
dom/vr/VRServiceTest.cpp
dom/vr/VRServiceTest.h
dom/vr/test/VRSimulationDriver.js
dom/vr/test/mochitest.ini
dom/vr/test/test_vrDisplay_onvrdisplaydeactivate_crosscontent.html
dom/webidl/VRServiceTest.webidl
gfx/vr/gfxVRPuppet.cpp
--- a/dom/vr/VRServiceTest.cpp
+++ b/dom/vr/VRServiceTest.cpp
@@ -25,17 +25,16 @@ NS_INTERFACE_MAP_END_INHERITING(DOMEvent
 
 NS_IMPL_ADDREF_INHERITED(VRMockDisplay, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(VRMockDisplay, DOMEventTargetHelper)
 
 VRMockDisplay::VRMockDisplay(const nsCString& aID, uint32_t aDeviceID)
  : mDeviceID(aDeviceID)
  , mTimestamp(TimeStamp::Now())
 {
-  mSensorState.Clear();
   mDisplayInfo.mDisplayName = aID;
   mDisplayInfo.mType = VRDeviceType::Puppet;
   mDisplayInfo.mIsConnected = true;
   mDisplayInfo.mIsMounted = false;
   mDisplayInfo.mCapabilityFlags = VRDisplayCapabilityFlags::Cap_None |
                                   VRDisplayCapabilityFlags::Cap_Orientation |
                                   VRDisplayCapabilityFlags::Cap_AngularAcceleration |
                                   VRDisplayCapabilityFlags::Cap_Position |
@@ -344,9 +343,9 @@ VRServiceTest::AttachVRController(const 
 
   gfx::VRManagerChild* vm = gfx::VRManagerChild::Get();
   vm->CreateVRServiceTestController(nsCString(ToNewUTF8String(aID)), p);
 
   return p.forget();
 }
 
 } // namespace dom
-} // namespace mozilla
+} // namespace mozilla
\ No newline at end of file
--- a/dom/vr/VRServiceTest.h
+++ b/dom/vr/VRServiceTest.h
@@ -22,17 +22,16 @@ public:
   VRMockDisplay(const nsCString& aID, uint32_t aDeviceID);
   void SetEyeParameter(VREye aEye, double aOffsetX, double aOffsetY, double aOffsetZ,
                        double aUpDegree, double aRightDegree,
                        double aDownDegree, double aLeftDegree);
   void SetEyeResolution(unsigned long aRenderWidth, unsigned long aRenderHeight);
   void SetPose(const Nullable<Float32Array>& aPosition, const Nullable<Float32Array>& aLinearVelocity,
                const Nullable<Float32Array>& aLinearAcceleration, const Nullable<Float32Array>& aOrientation,
                const Nullable<Float32Array>& aAngularVelocity, const Nullable<Float32Array>& aAngularAcceleration);
-  void SetMountState(bool aIsMounted) { mDisplayInfo.mIsMounted = aIsMounted; }
   void Update();
   virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
 private:
   ~VRMockDisplay() = default;
 
   uint32_t mDeviceID;
   gfx::VRDisplayInfo mDisplayInfo;
@@ -80,9 +79,9 @@ private:
 
   nsCOMPtr<nsPIDOMWindowInner> mWindow;
   bool mShuttingDown;
 };
 
 } // namespace dom
 } // namespace mozilla
 
-#endif // mozilla_dom_VRServiceTest_h_
+#endif // mozilla_dom_VRServiceTest_h_
\ No newline at end of file
--- a/dom/vr/test/VRSimulationDriver.js
+++ b/dom/vr/test/VRSimulationDriver.js
@@ -28,30 +28,25 @@ var SetEyeResolution = function(width, h
 }
 
 var SetEyeParameter = function(eye, offsetX, offsetY, offsetZ,
                                upDegree, rightDegree, downDegree, leftDegree) {
   vrMockDisplay.setEyeParameter(eye, offsetX, offsetY, offsetZ, upDegree, rightDegree,
                                 downDegree, leftDegree);
 }
 
-var SetMountState = function(isMounted) {
-  vrMockDisplay.setMountState(isMounted);
-}
-
 var UpdateVRDisplay = function() {
   vrMockDisplay.update();
 }
 
 var API = {
   AttachWebVRDisplay: AttachWebVRDisplay,
   SetVRDisplayPose: SetVRDisplayPose,
   SetEyeResolution: SetEyeResolution,
   SetEyeParameter: SetEyeParameter,
-  SetMountState: SetMountState,
   UpdateVRDisplay: UpdateVRDisplay,
 
   none: false
 };
 
 return API;
 
 }());
\ No newline at end of file
--- a/dom/vr/test/mochitest.ini
+++ b/dom/vr/test/mochitest.ini
@@ -1,12 +1,11 @@
 [DEFAULT]
 support-files =
   VRSimulationDriver.js
   requestPresent.js
   runVRTest.js
   WebVRHelpers.js
 
+[test_vrDisplay_getFrameData.html]
 [test_vrDisplay_exitPresent.html]
-[test_vrDisplay_getFrameData.html]
-[test_vrDisplay_onvrdisplaydeactivate_crosscontent.html]
 [test_vrDisplay_requestPresent.html]
 skip-if = true
\ No newline at end of file
deleted file mode 100644
--- a/dom/vr/test/test_vrDisplay_onvrdisplaydeactivate_crosscontent.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<html>
-  <head>
-    <title>VRDisplay onvrdisplaydeactivate Crosscontent test</title>
-    <meta name="timeout" content="long"/>
-    <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
-    <script src="/resources/testharness.js"></script>
-    <script src="/resources/testharnessreport.js"></script>
-    <script src="VRSimulationDriver.js"></script>
-    <script src="WebVRHelpers.js"></script>
-    <script src="requestPresent.js"></script>
-    <script src="runVRTest.js"></script>
-  </head>
-  <body>
-    <canvas id="vrCanvas"></canvas>
-    <script>
-
-      function startTest() {
-        var canvas = document.getElementById("vrCanvas");
-        var iframe1 = document.getElementById("iframe1").contentWindow;
-        var t = async_test("vrdisplaydeactivate crosscontent test");
-
-        window.addEventListener("vrdisplaydeactivate", () => {
-          t.step(() => {
-            assert_true(vrDisplay.isPresenting,
-                        "VRDisplay should be still presenting now without being affected by the event.");
-            t.done();
-          });
-        });
-
-        iframe1.addEventListener("vrdisplaydeactivate", () => {
-          t.unreached_func("vrdisplaydeactivate should not be received by other iframe.");
-        });
-
-        promise_test((test) => {
-          return attachVRDisplay(test).then(() => {
-            return promise_test((test) => {
-              return setupVRDisplay(test).then(() => {
-                VRSimulationDriver.SetMountState(true);
-                VRSimulationDriver.UpdateVRDisplay();
-                return WebVRHelpers.RequestPresentOnVRDisplay(vrDisplay, [{source: canvas}]);
-              }).then(() => {
-                VRSimulationDriver.SetMountState(false);
-                VRSimulationDriver.UpdateVRDisplay();
-              });
-            });
-          });
-        });
-      }
-
-      runVRTest(startTest);
-    </script>
-    <iframe id="iframe1"></iframe>
-  </body>
-</html>
\ No newline at end of file
--- a/dom/webidl/VRServiceTest.webidl
+++ b/dom/webidl/VRServiceTest.webidl
@@ -10,17 +10,16 @@
 interface VRMockDisplay {
   void setEyeResolution(unsigned long aRenderWidth, unsigned long aRenderHeight);
   void setEyeParameter(VREye eye, double offsetX, double offsetY, double offsetZ,
                        double upDegree, double rightDegree,
                        double downDegree, double leftDegree);
   void setPose(Float32Array? position, Float32Array? linearVelocity,
                Float32Array? linearAcceleration, Float32Array? orientation,
                Float32Array? angularVelocity, Float32Array? angularAcceleration);
-  void setMountState(boolean isMounted);
   void update();
 };
 
 [Pref="dom.vr.test.enabled",
  HeaderFile="mozilla/dom/VRServiceTest.h"]
 interface VRMockController {
   void newButtonEvent(unsigned long button, boolean pressed);
   void newAxisMoveEvent(unsigned long axis, double value);
--- a/gfx/vr/gfxVRPuppet.cpp
+++ b/gfx/vr/gfxVRPuppet.cpp
@@ -115,19 +115,18 @@ VRDisplayPuppet::VRDisplayPuppet()
 VRDisplayPuppet::~VRDisplayPuppet()
 {
   MOZ_COUNT_DTOR_INHERITED(VRDisplayPuppet, VRDisplayHost);
 }
 
 void
 VRDisplayPuppet::SetDisplayInfo(const VRDisplayInfo& aDisplayInfo)
 {
-  // We are only interested in the eye and mount info of the display info.
+  // We are only interested in the eye info of the display info.
   mDisplayInfo.mEyeResolution = aDisplayInfo.mEyeResolution;
-  mDisplayInfo.mIsMounted = aDisplayInfo.mIsMounted;
   memcpy(&mDisplayInfo.mEyeFOV, &aDisplayInfo.mEyeFOV,
          sizeof(mDisplayInfo.mEyeFOV[0]) * VRDisplayInfo::NumEyes);
   memcpy(&mDisplayInfo.mEyeTranslation, &aDisplayInfo.mEyeTranslation,
          sizeof(mDisplayInfo.mEyeTranslation[0]) * VRDisplayInfo::NumEyes);
 }
 
 void
 VRDisplayPuppet::Destroy()