Bug 1302503 - Allow quitApplication to be called without flags; r=automatedtester, a=test-only
authorAndreas Tolfsen <ato@mozilla.com>
Tue, 13 Sep 2016 19:20:39 +0100
changeset 348156 0d74830d451a85508c3e1f78eb264602cc51bdb8
parent 348155 f2fee5c32af52323cb91b977f9b4e56f81036a0d
child 348157 552d4e79ae73a8a6ef0249c7239acc8f6089df44
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, test-only
bugs1302503
milestone50.0a2
Bug 1302503 - Allow quitApplication to be called without flags; r=automatedtester, a=test-only MozReview-Commit-ID: 5ctSN5vZbSQ
testing/marionette/driver.js
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -2559,17 +2559,17 @@ GeckoDriver.prototype._checkIfAlertIsPre
  * session.
  */
 GeckoDriver.prototype.quitApplication = function(cmd, resp) {
   if (this.appName != "Firefox") {
     throw new WebDriverError("In app initiated quit only supported in Firefox");
   }
 
   let flags = Ci.nsIAppStartup.eAttemptQuit;
-  for (let k of cmd.parameters.flags) {
+  for (let k of cmd.parameters.flags || []) {
     flags |= Ci.nsIAppStartup[k];
   }
 
   this.stopSignal_();
   resp.send();
 
   this.sessionTearDown();
   Services.startup.quit(flags);