Bug 1371405 - Move to RectResponse aligning with the WebDriver crate; r=ato
☠☠ backed out by f937a959512a ☠ ☠
authorDavid Burns <dburns@mozilla.com>
Tue, 13 Jun 2017 15:23:32 +0100
changeset 365070 2165c3e795b89227783e394378cdc7e1c15d4c5f
parent 365069 6731e174280419faf890edb613d553b5c6642089
child 365071 9f4ce21f865261afaa08564bdd7914d78f6bf607
push id91680
push userkwierso@gmail.com
push dateWed, 21 Jun 2017 01:32:01 +0000
treeherdermozilla-inbound@f7b9dc31956c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1371405
milestone56.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 1371405 - Move to RectResponse aligning with the WebDriver crate; r=ato This uses the merged RectResponse from the WebDriver crate. It also moves the types in the struct to floats which aligns with the WebDriver specification as in https://w3c.github.io/webdriver/webdriver-spec.html#get-element-rect and in https://w3c.github.io/webdriver/webdriver-spec.html#dfn-window-rect MozReview-Commit-ID: DWeXJEnc1p
testing/geckodriver/src/marionette.rs
--- a/testing/geckodriver/src/marionette.rs
+++ b/testing/geckodriver/src/marionette.rs
@@ -735,40 +735,40 @@ impl MarionetteSession {
 
                 WebDriverResponse::ElementRect(RectResponse::new(x, y, width, height))
             },
             FullscreenWindow | MaximizeWindow | GetWindowRect |
             MaximizeWindow | SetWindowRect(_) => {
                 let width = try_opt!(
                     try_opt!(resp.result.find("width"),
                              ErrorStatus::UnknownError,
-                             "Failed to find width field").as_u64(),
+                             "Failed to find width field").as_f64(),
                     ErrorStatus::UnknownError,
-                    "Failed to interpret width as integer");
+                    "Failed to interpret width as float");
 
                 let height = try_opt!(
                     try_opt!(resp.result.find("height"),
                              ErrorStatus::UnknownError,
-                             "Failed to find height field").as_u64(),
+                             "Failed to find height field").as_f64(),
                     ErrorStatus::UnknownError,
-                    "Failed to interpret height as integer");
+                    "Failed to interpret height as float");
 
                 let x = try_opt!(
                     try_opt!(resp.result.find("x"),
                              ErrorStatus::UnknownError,
-                             "Failed to find x field").as_i64(),
+                             "Failed to find x field").as_f64(),
                     ErrorStatus::UnknownError,
-                    "Failed to interpret x as integer");
+                    "Failed to interpret x as float");
 
                 let y = try_opt!(
                     try_opt!(resp.result.find("y"),
                              ErrorStatus::UnknownError,
-                             "Failed to find y field").as_i64(),
+                             "Failed to find y field").as_f64(),
                     ErrorStatus::UnknownError,
-                    "Failed to interpret y as integer");
+                    "Failed to interpret y as float");
 
                 WebDriverResponse::WindowRect(RectResponse::new(x, y, width, height))
             },
             GetCookies => {
                 let cookies = try!(self.process_cookies(&resp.result));
                 WebDriverResponse::Cookie(CookieResponse::new(cookies))
             },
             GetNamedCookie(ref name) => {