Backed out 3 changesets (bug 1311802) for mochitest failures in test_vrDisplay_onvrdisplaydeactivate_crosscontent.html
☠☠ backed out by 295df6974eba ☠ ☠
authorIris Hsiao <ihsiao@mozilla.com>
Fri, 31 Mar 2017 14:35:43 +0800
changeset 350618 7e3f9a865413106cda6b83c5bf6f42796c3195e2
parent 350617 7d84bbf6302d4c47b3c048d51a07ef423a8b99dd
child 350619 ffbf6849c41f7488de07964aff8656cddc496617
push id31578
push usercbook@mozilla.com
push dateFri, 31 Mar 2017 12:43:10 +0000
treeherdermozilla-central@b82d0e0dc533 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1311802
milestone55.0a1
backs out44bd57c9340fb6643abdea7004d9faa38af81a61
4bb94cbb9a241bde62bdfb5bd0b5048a4af7c982
15d9c5895041bedaaf103078acdd7a043baba9f4
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 3 changesets (bug 1311802) for mochitest failures in test_vrDisplay_onvrdisplaydeactivate_crosscontent.html 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()