Bug 1280947 - Correct argument to event.sendEvent; r=automatedtester a=testonly
☠☠ backed out by 0a787a252077 ☠ ☠
authorAndreas Tolfsen <ato@mozilla.com>
Thu, 25 Aug 2016 14:16:10 +0100
changeset 347973 605a200c593861624551992e5f5f01a718e229be
parent 347972 ed0707148ece695a4a6063f8a06ce9bceb94a6b5
child 347974 07b0869f14b0b7f5d426e76b1d48f08eb79cdd89
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester, testonly
bugs1280947
milestone50.0a2
Bug 1280947 - Correct argument to event.sendEvent; r=automatedtester a=testonly Events were not registered when constructed with an object rather than a string literal. MozReview-Commit-ID: KhXcDPu70Vm
testing/marionette/event.js
--- a/testing/marionette/event.js
+++ b/testing/marionette/event.js
@@ -1301,34 +1301,34 @@ event.focus = function(el, opts = {}) {
   let win = doc.defaultView;
 
   let ev = new win.FocusEvent(el);
   ev.initEvent("focus", opts.canBubble, true);
   el.dispatchEvent(ev);
 };
 
 event.mouseover = function(el, modifiers = {}, opts = {}) {
-  return event.sendEvent({type: "mouseover"}, el, modifiers, opts);
+  return event.sendEvent("mouseover", el, modifiers, opts);
 };
 
 event.mousemove = function(el, modifiers = {}, opts = {}) {
-  return event.sendEvent({type: "mousemove"}, el, modifiers, opts);
+  return event.sendEvent("mousemove", el, modifiers, opts);
 };
 
 event.mousedown = function(el, modifiers = {}, opts = {}) {
-  return event.sendEvent({type: "mousedown"}, el, modifiers, opts);
+  return event.sendEvent("mousedown", el, modifiers, opts);
 };
 
 event.mouseup = function(el, modifiers = {}, opts = {}) {
-  return event.sendEvent({type: "mouseup"}, el, modifiers, opts);
+  return event.sendEvent("mouseup", el, modifiers, opts);
 };
 
 event.click = function(el, modifiers = {}, opts = {}) {
-  return event.sendEvent({type: "click"}, el, modifiers, opts);
+  return event.sendEvent("click", el, modifiers, opts);
 };
 
 event.change = function(el, modifiers = {}, opts = {}) {
-  return event.sendEvent({type: "change"}, el, modifiers, opts);
+  return event.sendEvent("change", el, modifiers, opts);
 };
 
 event.input = function(el, modifiers = {}, opts = {}) {
-  return event.sendEvent({type: "input"}, el, modifiers, opts);
+  return event.sendEvent("input", el, modifiers, opts);
 };