Bug 1340637 - Don't send the eForceQuit flag when shutting down the session; r=ato draft
authorJames Graham <james@hoppipolla.co.uk>
Wed, 08 Feb 2017 11:55:57 +0000
changeset 492100 240f27ae3dedee0c13c595e75a6872d72244afb3
parent 492068 503916e7e60e245ea53da5aa5154c38cc371dbc8
child 547651 3b9bdacb4dff8bdd19633c5e00b5d010ce44ab26
push id47531
push userbmo:ato@mozilla.com
push dateThu, 02 Mar 2017 20:23:59 +0000
reviewersato
bugs1340637
milestone54.0a1
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
testing/geckodriver/src/marionette.rs
--- 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),