Bug 1340637 - Don't send the eForceQuit flag when shutting down the session; r=ato
It turns out that Marionette already adds an eAttemptQuit flag, and
passing both of these is wrong. We want a graceful shutdown if
possible, so don't add the force flag.
MozReview-Commit-ID: 1B8MPy2N5xt
--- a/testing/geckodriver/src/marionette.rs
+++ b/testing/geckodriver/src/marionette.rs
@@ -814,21 +814,17 @@ impl MarionetteCommand {
fn from_webdriver_message(id: u64, msg: &WebDriverMessage<GeckoExtensionRoute>) -> WebDriverResult<MarionetteCommand> {
let (opt_name, opt_parameters) = match msg.command {
NewSession(ref x) => {
let mut data = BTreeMap::new();
data.insert("sessionId".to_string(), Json::Null);
data.insert("capabilities".to_string(), x.to_json());
(Some("newSession"), Some(Ok(data)))
},
- DeleteSession => {
- let mut body = BTreeMap::new();
- body.insert("flags".to_owned(), vec!["eForceQuit".to_json()].to_json());
- (Some("quitApplication"), Some(Ok(body)))
- },
+ DeleteSession => (Some("quitApplication"), None),
Status => panic!("Got status command that should already have been handled"),
Get(ref x) => (Some("get"), Some(x.to_marionette())),
GetCurrentUrl => (Some("getCurrentUrl"), None),
GoBack => (Some("goBack"), None),
GoForward => (Some("goForward"), None),
Refresh => (Some("refresh"), None),
GetTitle => (Some("getTitle"), None),
GetPageSource => (Some("getPageSource"), None),