Bug 1302503 - Allow quitApplication to be called without flags; r?automatedtester draft
authorAndreas Tolfsen <ato@mozilla.com>
Tue, 13 Sep 2016 19:20:39 +0100
changeset 413151 2cf52ca064f51002d5678caf6f987a16b9baa372
parent 413053 f5d043ce6d36a3c461cbd829d4a4a38394b7c436
child 531162 cf912f35273112c133e0b25836c710c4843cfe87
push id29361
push userbmo:ato@mozilla.com
push dateTue, 13 Sep 2016 18:38:55 +0000
reviewersautomatedtester
bugs1302503
milestone51.0a1
Bug 1302503 - Allow quitApplication to be called without flags; r?automatedtester MozReview-Commit-ID: 5ctSN5vZbSQ
testing/marionette/driver.js
--- a/testing/marionette/driver.js
+++ b/testing/marionette/driver.js
@@ -2571,17 +2571,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);