Bug 1509378 - Make test_input_number_mouse_events.html refer evt in checkInputEvent() rather than window.event r=smaug
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 28 Nov 2018 10:39:59 +0000
changeset 507760 8c72e35255c51ce9a67d9767c5d68ed91f3afa1b
parent 507759 aa145dd45f48ccc1989e0265897fcc1e99074072
child 507761 4990602fac5a62a88da5523d53c5465377c4e05f
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1509378
milestone65.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
Bug 1509378 - Make test_input_number_mouse_events.html refer evt in checkInputEvent() rather than window.event r=smaug Differential Revision: https://phabricator.services.mozilla.com/D13226
dom/html/test/forms/test_input_number_mouse_events.html
--- a/dom/html/test/forms/test_input_number_mouse_events.html
+++ b/dom/html/test/forms/test_input_number_mouse_events.html
@@ -137,17 +137,17 @@ const SETTIMEOUT_DELAY = 500;
 var spinTests = [
   // Test spining when the mouse button is kept depressed on the spin-up
   // button, then moved over the spin-down button:
   function() {
     var inputEventCount = 0;
     input.value = 0;
     input.addEventListener("input", function(evt) {
       ++inputEventCount;
-      checkInputEvent(event, "#1");
+      checkInputEvent(evt, "#1");
       if (inputEventCount == 3) {
         is(input.value, "3", "Testing spin-up button");
         synthesizeMouse(input, SPIN_DOWN_X, SPIN_DOWN_Y, { type: "mousemove" });
       } else if (inputEventCount == 6) {
         is(input.value, "0", "Testing spin direction is reversed after mouse moves from spin-up button to spin-down button");
         input.removeEventListener("input", arguments.callee);
         synthesizeMouse(input, SPIN_DOWN_X, SPIN_DOWN_Y, { type: "mouseup" });
         runNextSpinTest();
@@ -158,17 +158,17 @@ var spinTests = [
 
   // Test spining when the mouse button is kept depressed on the spin-down
   // button, then moved over the spin-up button:
   function() {
     var inputEventCount = 0;
     input.value = 0;
     input.addEventListener("input", function(evt) {
       ++inputEventCount;
-      checkInputEvent(event, "#2");
+      checkInputEvent(evt, "#2");
       if (inputEventCount == 3) {
         is(input.value, "-3", "Testing spin-down button");
         synthesizeMouse(input, SPIN_UP_X, SPIN_UP_Y, { type: "mousemove" });
       } else if (inputEventCount == 6) {
         is(input.value, "0", "Testing spin direction is reversed after mouse moves from spin-down button to spin-up button");
         input.removeEventListener("input", arguments.callee);
         synthesizeMouse(input, SPIN_UP_X, SPIN_UP_Y, { type: "mouseup" });
         runNextSpinTest();
@@ -179,17 +179,17 @@ var spinTests = [
 
   // Test that the spin is stopped when the mouse button is depressod on the
   // spin-up button, then moved outside both buttons once the spin starts:
   function() {
     var inputEventCount = 0;
     input.value = 0;
     input.addEventListener("input", function(evt) {
       ++inputEventCount;
-      checkInputEvent(event, "#3");
+      checkInputEvent(evt, "#3");
       if (inputEventCount == 3) {
         synthesizeMouse(input, -1, -1, { type: "mousemove" });
         var eventHandler = arguments.callee;
         setTimeout(function() {
           is(input.value, "3", "Testing moving the mouse outside the spin buttons stops the spin");
           is(inputEventCount, 3, "Testing moving the mouse outside the spin buttons stops the spin input events");
           input.removeEventListener("input", eventHandler);
           synthesizeMouse(input, -1, -1, { type: "mouseup" });
@@ -201,17 +201,17 @@ var spinTests = [
   },
 
   // Test that changing the input type in the middle of a spin cancels the spin:
   function() {
     var inputEventCount = 0;
     input.value = 0;
     input.addEventListener("input", function(evt) {
       ++inputEventCount;
-      checkInputEvent(event, "#4");
+      checkInputEvent(evt, "#4");
       if (inputEventCount == 3) {
         input.type = "text"
         var eventHandler = arguments.callee;
         setTimeout(function() {
           is(input.value, "-3", "Testing changing input type during a spin stops the spin");
           is(inputEventCount, 3, "Testing changing input type during a spin stops the spin input events");
           input.removeEventListener("input", eventHandler);
           synthesizeMouse(input, SPIN_DOWN_X, SPIN_DOWN_Y, { type: "mouseup" });