Bug 1124409 - Fix test_bug659071.html to properly reset page zoom before finishing. r=smaug, a=test-only
authorTim Taubert <ttaubert@mozilla.com>
Tue, 17 Mar 2015 22:05:58 +0100
changeset 250442 e4f1cc6f63a3
parent 250441 46cfbcfb58c5
child 250443 968fa2b32612
push id4589
push userryanvm@gmail.com
push date2015-03-19 02:20 +0000
treeherdermozilla-beta@d76c709556bb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, test-only
bugs1124409, 659071
milestone37.0
Bug 1124409 - Fix test_bug659071.html to properly reset page zoom before finishing. r=smaug, a=test-only
dom/events/test/window_bug659071.html
--- a/dom/events/test/window_bug659071.html
+++ b/dom/events/test/window_bug659071.html
@@ -43,19 +43,26 @@ function runTests()
        "failed to reset zoom");
     synthesizeWheel(video, 10, 10,
       { deltaMode: WheelEvent.DOM_DELTA_LINE, ctrlKey: true,
         deltaX: 0, deltaY: 1.0, lineOrPageDeltaX: 0, lineOrPageDeltaY: 1 });
     hitEventLoop(function () {
       isnot(SpecialPowers.getFullZoom(window), 1.0,
              "failed to zoom by ctrl+wheel");
 
-      synthesizeKey("0", { accelKey: true });
-      SpecialPowers.clearUserPref("mousewheel.with_control.action");
+      synthesizeWheel(video, 10, 10,
+        { deltaMode: WheelEvent.DOM_DELTA_LINE, ctrlKey: true,
+          deltaX: 0, deltaY: 1.0, lineOrPageDeltaX: 0, lineOrPageDeltaY: -1 });
+      hitEventLoop(function () {
+        is(SpecialPowers.getFullZoom(window), 1.0,
+           "failed to reset zoom");
 
-      hitEventLoop(window.opener.finish, 20);
+        SpecialPowers.clearUserPref("mousewheel.with_control.action");
+
+        hitEventLoop(window.opener.finish, 20);
+      }, 20);
     }, 20);
   }, 20);
 }
 
 </script>
 </body>
 </html>