Bug 1477476 - Drop geckodriver check for malformed sessionId from Marionette. r=automatedtester
authorAndreas Tolfsen <ato@sny.no>
Sat, 21 Jul 2018 14:17:35 +0100
changeset 821993 666d7dc7a32cbcacb8ef4b0120cf849a7ca8a911
parent 821992 0a9411bc7b5dcfac1c3e2deacaa8d0b65d5b3a85
child 821994 e9d0102d718ffcb48ecf4882528d69e1c3946893
push id117242
push userrwood@mozilla.com
push dateTue, 24 Jul 2018 13:33:52 +0000
reviewersautomatedtester
bugs1477476
milestone63.0a1
Bug 1477476 - Drop geckodriver check for malformed sessionId from Marionette. r=automatedtester Marionette used to return a session UUID starting with "{" and ending with "}" from the uuid-generator in Gecko. It has not done this for a very long time rendering this geckodriver check needless.
testing/geckodriver/src/marionette.rs
--- a/testing/geckodriver/src/marionette.rs
+++ b/testing/geckodriver/src/marionette.rs
@@ -880,26 +880,22 @@ impl MarionetteSession {
             GetActiveElement => {
                 let element = try!(self.to_web_element(
                     try_opt!(resp.result.find("value"),
                              ErrorStatus::UnknownError,
                              "Failed to find value field")));
                 WebDriverResponse::Generic(ValueResponse::new(element.to_json()))
             },
             NewSession(_) => {
-                let mut session_id = try_opt!(
+                let session_id = try_opt!(
                     try_opt!(resp.result.find("sessionId"),
                              ErrorStatus::InvalidSessionId,
                              "Failed to find sessionId field").as_string(),
                     ErrorStatus::InvalidSessionId,
-                    "sessionId was not a string");
-
-                if session_id.starts_with("{") && session_id.ends_with("}") {
-                    session_id = &session_id[1..session_id.len()-1];
-                }
+                    "sessionId is not a string");
 
                 let mut capabilities = try_opt!(
                     try_opt!(resp.result.find("capabilities"),
                              ErrorStatus::UnknownError,
                              "Failed to find capabilities field").as_object(),
                     ErrorStatus::UnknownError,
                     "capabilities field is not an object").clone();