Bug 1107706: Part 15: Fix emulator callbacks for content process
authorAndreas Tolfsen <ato@mozilla.com>
Mon, 23 Mar 2015 15:40:51 +0000
changeset 264858 0736c222ecb9873a5d96727d03425710bb81961a
parent 264857 b4606044035729b11d0a5f4a8fbe4db18d8434db
child 264859 821bb2b2dca684132d7abcaeb550fca8916ba393
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1107706
milestone39.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 1107706: Part 15: Fix emulator callbacks for content process
testing/marionette/simpletest.js
--- a/testing/marionette/simpletest.js
+++ b/testing/marionette/simpletest.js
@@ -32,16 +32,18 @@ Marionette.prototype = {
     "ok",
     "is",
     "isnot",
     "todo",
     "log",
     "getLogs",
     "generate_results",
     "waitFor",
+    "runEmulatorCmd",
+    "runEmulatorShell",
     "TEST_PASS",
     "TEST_KNOWN_FAIL",
     "TEST_UNEXPECTED_FAIL",
     "TEST_UNEXPECTED_PASS"
   ],
 
   addTest: function Marionette__addTest(condition, name, passString, failString, diag, state) {
 
@@ -196,9 +198,19 @@ Marionette.prototype = {
       if (deadline <= now) {
         dump("waitFor timeout: " + test.toString() + "\n");
         // the script will timeout here, so no need to raise a separate
         // timeout exception
         return;
       }
       this.window.setTimeout(this.waitFor.bind(this), 100, callback, test, deadline);
   },
+
+  runEmulatorCmd: function runEmulatorCmd(cmd, callback) {
+    this.heartbeatCallback();
+    this.scope.runEmulatorCmd(cmd, callback);
+  },
+
+  runEmulatorShell: function runEmulatorShell(args, callback) {
+    this.heartbeatCallback();
+    this.scope.runEmulatorShell(args, callback);
+  },
 };