Bug 1201050: Part 4: Pass value directly back to chrome space
authorAndreas Tolfsen <ato@mozilla.com>
Thu, 26 Nov 2015 14:31:45 +0000
changeset 274362 1f2b651a5d2900c4c25085b8a380e60a95246e94
parent 274361 25ee0b9f4a4998eaafe6b220634c3d9aab8a8a28
child 274363 e72970c5252d0f26302ffe8dc4104ddf37a193b8
push id68547
push useratolfsen@mozilla.com
push dateThu, 26 Nov 2015 16:24:33 +0000
treeherdermozilla-inbound@1f2b651a5d29 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1201050
milestone45.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 1201050: Part 4: Pass value directly back to chrome space r=ato
testing/marionette/actions.js
testing/marionette/driver.js
--- a/testing/marionette/actions.js
+++ b/testing/marionette/actions.js
@@ -69,17 +69,17 @@ ActionChain.prototype.dispatchActions = 
     ctrlKey: false,
     altKey: false,
     metaKey: false
   };
 
   try {
     this.actions(commandArray, touchId, 0, keyModifiers);
   } catch (e) {
-    this.onError(e);
+    callbacks.onError(e);
     this.resetValues();
   }
 };
 
 /**
  * This function emit mouse event.
  *
  * @param {Document} doc
@@ -151,17 +151,17 @@ ActionChain.prototype.resetValues = func
  * Function to emit touch events for each finger. e.g.
  * finger=[['press', id], ['wait', 5], ['release']] touchId represents
  * the finger id, i keeps track of the current action of the chain
  * keyModifiers is an object keeping track keyDown/keyUp pairs through
  * an action chain.
  */
 ActionChain.prototype.actions = function(chain, touchId, i, keyModifiers) {
   if (i == chain.length) {
-    this.onSuccess({value: touchId || null});
+    this.onSuccess(touchId || null);
     this.resetValues();
     return;
   }
 
   let pack = chain[i];
   let command = pack[0];
   let el;
   let c;
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -1852,17 +1852,17 @@ GeckoDriver.prototype.actionChain = func
       }
 
       let cbs = {};
       cbs.onSuccess = val => resp.body.value = val;
       cbs.onError = err => { throw err; };
 
       let win = this.getCurrentWindow();
       let elm = this.curBrowser.elementManager;
-      this.actions.dispatchActions(chain, nextId, { frame: win }, elm, cbs);
+      this.actions.dispatchActions(chain, nextId, {frame: win}, elm, cbs);
       break;
 
     case Context.CONTENT:
       this.addFrameCloseListener("action chain");
       resp.body.value = yield this.listener.actionChain(chain, nextId);
       break;
   }
 };