Bug 1370510 - Update WebDriver Crate dependency; r=jgraham
authorDavid Burns <dburns@mozilla.com>
Wed, 07 Jun 2017 21:54:49 +0100
changeset 411114 f6f6770d93afdf8b1283af892059572c79a29f2b
parent 411113 a7d219eb3c53cb0ce4e99a7bc49ee5b41b8e08b4
child 411115 b977e23d261c81568a53fabfaa8885566f76fe47
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1370510
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1370510 - Update WebDriver Crate dependency; r=jgraham MozReview-Commit-ID: 7Rht3CxZpy3
third_party/rust/webdriver/.cargo-checksum.json
third_party/rust/webdriver/Cargo.toml
third_party/rust/webdriver/src/capabilities.rs
third_party/rust/webdriver/src/command.rs
third_party/rust/webdriver/src/httpapi.rs
third_party/rust/webdriver/src/server.rs
--- a/third_party/rust/webdriver/.cargo-checksum.json
+++ b/third_party/rust/webdriver/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"6d7856aa51991bc6c15945046377a9992b8886cc8e4602d08f650f92803b71f6",".travis.yml":"78252ef89a407b1d76616b7afbf7afb8205530a7f7039f3a7ea140684e3aa8bc","Cargo.toml":"e5bfb146651b511a3e5c3493e11f7c3f845e948f95fe3796b32120decee6eac6","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","README.md":"bd0e99ce271903a9f67cf5f8fca2f67f2583e4336fbaf583fcd78ec238d4176e","src/capabilities.rs":"6d65b5ca60a1c7140da33ab691bc877e335e4387edb09a7933605168db6e56b3","src/command.rs":"6d50f9ead11599c786d9d50708b633e6163764f3b8210cde0c557e42535c79c1","src/common.rs":"d696aabe88061f8315578c42115d976123a8fc4276384e478e14d241dfc9acc0","src/error.rs":"b0acf64e052edbc26e7dbcd1a54e8b9a786f01e9d48e0e5b2f410266bfdb9da2","src/httpapi.rs":"243cde695399975e5ff1ad765df26fe961f70ad9199f378c7544cf861c6bfe87","src/lib.rs":"336c146e934711dfe49f4b44bbcf278686b00be8d89abb9c7b7b045254994fbf","src/macros.rs":"93094c48e3880d925e684fba9678693eb8c0c39c7ed47b130b0751c4bca37ddc","src/response.rs":"c09d92fcf8177e3a0950db71f843123bab3dea78f136ba9c712afe1893f73961","src/server.rs":"dbbedec59c9a54629a4c59bd9aa3494d8621e59721f99c00b24c3b84a62a2e72"},"package":"0d161bc62ed766ddc0838af89f1b339ed3c8b5c3dbe8776b59731dfae7b1a6c7"}
\ No newline at end of file
+{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"6d7856aa51991bc6c15945046377a9992b8886cc8e4602d08f650f92803b71f6",".travis.yml":"78252ef89a407b1d76616b7afbf7afb8205530a7f7039f3a7ea140684e3aa8bc","Cargo.toml":"ed7a4c3380fbb78b99be805c20f20d590e5f377173284017ed86606cef3663e9","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","README.md":"bd0e99ce271903a9f67cf5f8fca2f67f2583e4336fbaf583fcd78ec238d4176e","src/capabilities.rs":"5039c1f80885ca2bab19f2d1c40b405c37c09901918625395141ac2e01600728","src/command.rs":"4bc0380b3e8916dd7514f751b18b47bf510c1fa16d9832617cf0ce5470d87797","src/common.rs":"d696aabe88061f8315578c42115d976123a8fc4276384e478e14d241dfc9acc0","src/error.rs":"b0acf64e052edbc26e7dbcd1a54e8b9a786f01e9d48e0e5b2f410266bfdb9da2","src/httpapi.rs":"44f1061123580ebb73ddd164a18cb223e16445c6a2eabd91f14c39d6a3d282e1","src/lib.rs":"336c146e934711dfe49f4b44bbcf278686b00be8d89abb9c7b7b045254994fbf","src/macros.rs":"93094c48e3880d925e684fba9678693eb8c0c39c7ed47b130b0751c4bca37ddc","src/response.rs":"c09d92fcf8177e3a0950db71f843123bab3dea78f136ba9c712afe1893f73961","src/server.rs":"f2110378cfaf7a4facb39d0e45c479a00c95a939536c85a6a105c858fffc2d70"},"package":"3099729d884692d690796454e8529edf3f0ebd87c87840f9c809df8eabb175ed"}
\ No newline at end of file
--- a/third_party/rust/webdriver/Cargo.toml
+++ b/third_party/rust/webdriver/Cargo.toml
@@ -1,11 +1,11 @@
 [package]
 name = "webdriver"
-version = "0.25.2"
+version = "0.26.0"
 authors = ["Mozilla Tools and Automation <tools@lists.mozilla.com>"]
 description = "Library implementing the wire protocol for the W3C WebDriver specification"
 documentation = "https://docs.rs/webdriver"
 repository = "https://github.com/mozilla/webdriver-rust"
 readme = "README.md"
 keywords = ["webdriver", "browser", "automation", "protocol", "w3c"]
 license = "MPL-2.0"
 
--- a/third_party/rust/webdriver/src/capabilities.rs
+++ b/third_party/rust/webdriver/src/capabilities.rs
@@ -100,17 +100,17 @@ impl SpecNewSessionParameters {
                     try!(SpecNewSessionParameters::validate_page_load_strategy(value))
                 }
                 "proxy" => {
                     try!(SpecNewSessionParameters::validate_proxy(value))
                 },
                 "timeouts" => {
                     try!(SpecNewSessionParameters::validate_timeouts(value))
                 },
-                "unhandledPromptBehaviour" => {
+                "unhandledPromptBehavior" => {
                     try!(SpecNewSessionParameters::validate_unhandled_prompt_behaviour(value))
                 }
                 x => {
                     if !x.contains(":") {
                         return Err(WebDriverError::new(ErrorStatus::InvalidArgument,
                                                        format!("{} was not a the name of a known capability or a valid extension capability", x)))
                     } else {
                         try!(browser_capabilities.validate_custom(x, value));
@@ -289,22 +289,22 @@ impl SpecNewSessionParameters {
             }
         }
         Ok(())
     }
 
     fn validate_unhandled_prompt_behaviour(value: &Json) -> WebDriverResult<()> {
         let behaviour = try_opt!(value.as_string(),
                                  ErrorStatus::InvalidArgument,
-                                 "unhandledPromptBehaviour capability was not a string");
+                                 "unhandledPromptBehavior capability was not a string");
         match behaviour {
             "dismiss" |
             "accept" => {},
             x => return Err(WebDriverError::new(ErrorStatus::InvalidArgument,
-                                                format!("{} was not a valid unhandledPromptBehaviour value", x)))        }
+                                                format!("{} was not a valid unhandledPromptBehavior value", x)))        }
         Ok(())
     }
 }
 
 impl Parameters for SpecNewSessionParameters {
     fn from_json(body: &Json) -> WebDriverResult<SpecNewSessionParameters> {
         let data = try_opt!(body.as_object(),
                             ErrorStatus::UnknownError,
--- a/third_party/rust/webdriver/src/command.rs
+++ b/third_party/rust/webdriver/src/command.rs
@@ -21,17 +21,17 @@ pub enum WebDriverCommand<T: WebDriverEx
     GetTitle,
     GetPageSource,
     GetWindowHandle,
     GetWindowHandles,
     CloseWindow,
     GetWindowRect,
     SetWindowRect(WindowRectParameters),
     MaximizeWindow,
-//    FullscreenWindow // Not supported in marionette
+    FullscreenWindow,
     SwitchToWindow(SwitchToWindowParameters),
     SwitchToFrame(SwitchToFrameParameters),
     SwitchToParentFrame,
     FindElement(LocatorParameters),
     FindElements(LocatorParameters),
     FindElementElement(WebElement, LocatorParameters),
     FindElementElements(WebElement, LocatorParameters),
     GetActiveElement,
@@ -131,16 +131,17 @@ impl<U: WebDriverExtensionRoute> WebDriv
                 WebDriverCommand::SetTimeouts(parameters)
             },
             Route::GetWindowRect | Route::GetWindowPosition | Route::GetWindowSize => WebDriverCommand::GetWindowRect,
             Route::SetWindowRect | Route::SetWindowPosition | Route::SetWindowSize => {
                 let parameters: WindowRectParameters = Parameters::from_json(&body_data)?;
                 WebDriverCommand::SetWindowRect(parameters)
             },
             Route::MaximizeWindow => WebDriverCommand::MaximizeWindow,
+            Route::FullscreenWindow => WebDriverCommand::FullscreenWindow,
             Route::SwitchToWindow => {
                 let parameters: SwitchToWindowParameters = try!(Parameters::from_json(&body_data));
                 WebDriverCommand::SwitchToWindow(parameters)
             }
             Route::SwitchToFrame => {
                 let parameters: SwitchToFrameParameters = try!(Parameters::from_json(&body_data));
                 WebDriverCommand::SwitchToFrame(parameters)
             },
@@ -396,16 +397,17 @@ impl <U:WebDriverExtensionRoute> ToJson 
             WebDriverCommand::GetWindowHandles |
             WebDriverCommand::GetWindowRect |
             WebDriverCommand::GoBack |
             WebDriverCommand::GoForward |
             WebDriverCommand::IsDisplayed(_) |
             WebDriverCommand::IsEnabled(_) |
             WebDriverCommand::IsSelected(_) |
             WebDriverCommand::MaximizeWindow |
+            WebDriverCommand::FullscreenWindow |
             WebDriverCommand::NewSession(_) |
             WebDriverCommand::Refresh |
             WebDriverCommand::Status |
             WebDriverCommand::SwitchToParentFrame |
             WebDriverCommand::TakeElementScreenshot(_) |
             WebDriverCommand::TakeScreenshot => {
                 None
             },
@@ -535,26 +537,26 @@ impl Parameters for TimeoutsParameters {
             }
             None => None,
         };
 
         let page_load = match data.get("pageLoad") {
             Some(json) => {
                 Some(try_opt!(json.as_u64(),
                               ErrorStatus::InvalidArgument,
-                              "Script timeout duration was not a signed integer"))
+                              "Page load timeout duration was not a signed integer"))
             }
             None => None,
         };
 
         let implicit = match data.get("implicit") {
             Some(json) => {
                 Some(try_opt!(json.as_u64(),
                               ErrorStatus::InvalidArgument,
-                              "Script timeout duration was not a signed integer"))
+                              "Implicit timeout duration was not a signed integer"))
             }
             None => None,
         };
 
         Ok(TimeoutsParameters {
             script: script,
             page_load: page_load,
             implicit: implicit,
--- a/third_party/rust/webdriver/src/httpapi.rs
+++ b/third_party/rust/webdriver/src/httpapi.rs
@@ -23,16 +23,17 @@ fn standard_routes<U:WebDriverExtensionR
                 (Delete, "/session/{sessionId}/window", Route::CloseWindow),
                 (Get, "/session/{sessionId}/window/size", Route::GetWindowSize),
                 (Post, "/session/{sessionId}/window/size", Route::SetWindowSize),
                 (Get, "/session/{sessionId}/window/position", Route::GetWindowPosition),
                 (Post, "/session/{sessionId}/window/position", Route::SetWindowPosition),
                 (Get, "/session/{sessionId}/window/rect", Route::GetWindowRect),
                 (Post, "/session/{sessionId}/window/rect", Route::SetWindowRect),
                 (Post, "/session/{sessionId}/window/maximize", Route::MaximizeWindow),
+                (Post, "/session/{sessionId}/window/fullscreen", Route::FullscreenWindow),
                 (Post, "/session/{sessionId}/window", Route::SwitchToWindow),
                 (Post, "/session/{sessionId}/frame", Route::SwitchToFrame),
                 (Post, "/session/{sessionId}/frame/parent", Route::SwitchToParentFrame),
                 (Post, "/session/{sessionId}/element", Route::FindElement),
                 (Post, "/session/{sessionId}/elements", Route::FindElements),
                 (Post, "/session/{sessionId}/element/{elementId}/element", Route::FindElementElement),
                 (Post, "/session/{sessionId}/element/{elementId}/elements", Route::FindElementElements),
                 (Get, "/session/{sessionId}/element/active", Route::GetActiveElement),
@@ -85,16 +86,17 @@ pub enum Route<U:WebDriverExtensionRoute
     CloseWindow,
     GetWindowSize,  // deprecated
     SetWindowSize,  // deprecated
     GetWindowPosition,  // deprecated
     SetWindowPosition,  // deprecated
     GetWindowRect,
     SetWindowRect,
     MaximizeWindow,
+    FullscreenWindow,
     SwitchToWindow,
     SwitchToFrame,
     SwitchToParentFrame,
     FindElement,
     FindElements,
     FindElementElement,
     FindElementElements,
     GetActiveElement,
--- a/third_party/rust/webdriver/src/server.rs
+++ b/third_party/rust/webdriver/src/server.rs
@@ -100,19 +100,18 @@ impl<T: WebDriverHandler<U>, U: WebDrive
     fn check_session(&self, msg: &WebDriverMessage<U>) -> WebDriverResult<()> {
         match msg.session_id {
             Some(ref msg_session_id) => {
                 match self.session {
                     Some(ref existing_session) => {
                         if existing_session.id != *msg_session_id {
                             Err(WebDriverError::new(
                                 ErrorStatus::InvalidSessionId,
-                                format!("Got unexpected session id {} expected {}",
-                                        msg_session_id,
-                                        existing_session.id)))
+                                format!("Got unexpected session id {}",
+                                        msg_session_id)))
                         } else {
                             Ok(())
                         }
                     },
                     None => Ok(())
                 }
             },
             None => {
@@ -168,17 +167,17 @@ impl<U: WebDriverExtensionRoute> Handler
         let mut req = req;
         let mut res = res;
 
         let mut body = String::new();
         if let Method::Post = req.method {
             req.read_to_string(&mut body).unwrap();
         }
 
-        debug!("→ {} {} {}", req.method, req.uri, body);
+        debug!("-> {} {} {}", req.method, req.uri, body);
 
         match req.uri {
             AbsolutePath(path) => {
                 let msg_result = {
                     // The fact that this locks for basically the whole request doesn't
                     // matter as long as we are only handling one request at a time.
                     match self.api.lock() {
                         Ok(ref api) => api.decode_request(req.method, &path[..], &body[..]),
@@ -213,17 +212,17 @@ impl<U: WebDriverExtensionRoute> Handler
                                 }
                             }
                             Err(e) => panic!("Error reading response: {:?}", e),
                         }
                     }
                     Err(err) => (err.http_status(), err.to_json_string()),
                 };
 
-                debug!("← {} {}", status, resp_body);
+                debug!("<- {} {}", status, resp_body);
 
                 {
                     let resp_status = res.status_mut();
                     *resp_status = status;
                 }
                 res.headers_mut()
                     .set(ContentType(Mime(TopLevel::Application,
                                           SubLevel::Json,