Bug 1302503 - Allow quitApplication to be called without flags; r?automatedtester
MozReview-Commit-ID: 5ctSN5vZbSQ
--- 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);