Backed out changeset fcdaffc1de9f (bug 1351148)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 28 Jul 2017 09:20:11 +0200
changeset 420155 5c25a2f385daf14519659aa503fcfb82997d39d5
parent 420154 0eb55e68eccca8d472bca1d27c9cd3f98e4fd542
child 420156 1fb9a39d413c7995ae00ca5f55c44fe251c9b320
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1351148
milestone56.0a1
backs outfcdaffc1de9fcc71d37c60f807be7d2885bb6fc6
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 changeset fcdaffc1de9f (bug 1351148)
dom/events/test/window_wheel_default_action.html
--- a/dom/events/test/window_wheel_default_action.html
+++ b/dom/events/test/window_wheel_default_action.html
@@ -1136,61 +1136,37 @@ function doTestZoom(aSettings, aCallback
     event.ctrlKey  = true;
 
     // NOTE: Zooming might change scrollTop and scrollLeft by rounding fraction.
     //       This test assume that zoom happens synchronously and scrolling
     //       happens asynchronously.
     var scrollTop = gScrollableElement.scrollTop;
     var scrollLeft = gScrollableElement.scrollLeft;
 
-    fullZoomChangePromise = new Promise(resolve => {
-      if (currentTest.expected & (kNegative | kPositive)) {
-        SpecialPowers.addChromeEventListener("FullZoomChange", function onFullZoomChange() {
-          if (SpecialPowers.getFullZoom(window) != 1) {
-            SpecialPowers.removeChromeEventListener("FullZoomChange", onFullZoomChange)
-            setTimeout(() => resolve(), 0);
-          }
-        });
-      } else {
-        resolve();
-      }
-    });
-
     sendWheelAndWait(10, 10, event, function () {
       is(gScrollableElement.scrollTop, scrollTop, description + "scrolled vertical");
       is(gScrollableElement.scrollLeft, scrollLeft, description + "scrolled horizontal");
-
-      fullZoomChangePromise.then(() => {
-        // When input event prioritization is enabled, the wheel event may be
-        // dispatched to the content process before the message 'FullZoom' to
-        // zoom in/out. Waiting for the event 'FullZoomChange' and then check
-        // the result.
-        if (!(currentTest.expected & (kNegative | kPositive))) {
-          is(SpecialPowers.getFullZoom(window), 1.0, description + "zoomed");
+      if (!(currentTest.expected & (kNegative | kPositive))) {
+        is(SpecialPowers.getFullZoom(window), 1.0, description + "zoomed");
+      } else {
+        var isReverted = (currentTest.expected & kUseX) ? isXReverted :
+                         (currentTest.expected & kUseY) ? isYReverted : false;
+        if ((!isReverted && (currentTest.expected & kNegative)) ||
+            (isReverted && (currentTest.expected & kPositive))) {
+          ok(SpecialPowers.getFullZoom(window) > 1.0,
+             description + "not zoomed in, got " + SpecialPowers.getFullZoom(window));
         } else {
-          var isReverted = (currentTest.expected & kUseX) ? isXReverted :
-                           (currentTest.expected & kUseY) ? isYReverted : false;
-          if ((!isReverted && (currentTest.expected & kNegative)) ||
-              (isReverted && (currentTest.expected & kPositive))) {
-            ok(SpecialPowers.getFullZoom(window) > 1.0,
-               description + "not zoomed in, got " + SpecialPowers.getFullZoom(window));
-          } else {
-            ok(SpecialPowers.getFullZoom(window) < 1.0,
-               description + "not zoomed out, got " + SpecialPowers.getFullZoom(window));
-          }
+          ok(SpecialPowers.getFullZoom(window) < 1.0,
+             description + "not zoomed out, got " + SpecialPowers.getFullZoom(window));
         }
-        if (SpecialPowers.getFullZoom(window) != 1) {
-          // Only synthesizes key event to reset zoom when necessary to avoid
-          // triggering the next test before the key event is handled. In that
-          // case, the key event may break the next test.
-          synthesizeKey("0", { accelKey: true });
-        }
-        onZoomReset(function () {
-          hitEventLoop(doNextTest, 20);
-        });
+      }
+
+      synthesizeKey("0", { accelKey: true });
+      onZoomReset(function () {
+        hitEventLoop(doNextTest, 20);
       });
     });
   }
   doNextTest();
 }
 
 function doTestZoomedScroll(aCallback)
 {