Bug 1280947 - Correct argument to event.sendEvent; r=automatedtester a=testonly
☠☠ backed out by e3cc699ccef2 ☠ ☠
authorAndreas Tolfsen <ato@mozilla.com>
Thu, 25 Aug 2016 14:16:10 +0100
changeset 342559 e7599a44f0aecb5e7d72eccd0dbb4f111813cc72
parent 342558 91d56ae239b27ea52b685f10bf40f6e9cfa0f1c7
child 342560 64412641007c0bbe5734041dfc5fee6b1edc3447
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester, testonly
bugs1280947
milestone49.0
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);
 };