Backed out changeset 3c648baf694f (bug 1371405)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 20 Jun 2017 16:03:48 +0200
changeset 365057 cc9740e07f1b4058f16821350e865a5962a1b690
parent 365056 696be68b6600098eec55b6f25dc58bb9464082a5
child 365058 dd4e600e972a2234883e73ad4f7b21c10a1b9675
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)
bugs1371405
milestone56.0a1
backs out3c648baf694fcbb62d7658b4af26c9856d1c11a1
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
Backed out changeset 3c648baf694f (bug 1371405)
testing/geckodriver/src/marionette.rs
--- a/testing/geckodriver/src/marionette.rs
+++ b/testing/geckodriver/src/marionette.rs
@@ -35,19 +35,18 @@ use webdriver::command::WebDriverCommand
     DeleteCookies, DeleteCookie, GetTimeouts, SetTimeouts, DismissAlert,
     AcceptAlert, GetAlertText, SendAlertText, TakeScreenshot, TakeElementScreenshot,
     Extension, PerformActions, ReleaseActions};
 use webdriver::command::{
     NewSessionParameters, GetParameters, WindowRectParameters, SwitchToWindowParameters,
     SwitchToFrameParameters, LocatorParameters, JavascriptCommandParameters,
     GetNamedCookieParameters, AddCookieParameters, TimeoutsParameters,
     ActionsParameters, TakeScreenshotParameters};
-use webdriver::response::{CloseWindowResponse, Cookie, CookieResponse, CookiesResponse,
-                          RectResponse, NewSessionResponse, TimeoutsResponse, ValueResponse,
-                          WebDriverResponse};
+use webdriver::response::{CloseWindowResponse, Cookie, CookieResponse, RectResponse,
+                          NewSessionResponse, TimeoutsResponse, ValueResponse, WebDriverResponse};
 use webdriver::common::{
     Date, Nullable, WebElement, FrameId, ELEMENT_KEY};
 use webdriver::error::{ErrorStatus, WebDriverError, WebDriverResult};
 use webdriver::server::{WebDriverHandler, Session};
 use webdriver::httpapi::{WebDriverExtensionRoute};
 
 use capabilities::{FirefoxCapabilities, FirefoxOptions};
 use prefs;
@@ -732,17 +731,17 @@ impl MarionetteSession {
                              ErrorStatus::UnknownError,
                              "Failed to find height field").as_f64(),
                     ErrorStatus::UnknownError,
                     "Failed to interpret width as float");
 
                 WebDriverResponse::ElementRect(RectResponse::new(x, y, width, height))
             },
             FullscreenWindow | MaximizeWindow | GetWindowRect |
-            SetWindowRect(_) => {
+            MaximizeWindow | SetWindowRect(_) => {
                 let width = try_opt!(
                     try_opt!(resp.result.find("width"),
                              ErrorStatus::UnknownError,
                              "Failed to find width field").as_f64(),
                     ErrorStatus::UnknownError,
                     "Failed to interpret width as float");
 
                 let height = try_opt!(
@@ -765,22 +764,22 @@ impl MarionetteSession {
                              "Failed to find y field").as_f64(),
                     ErrorStatus::UnknownError,
                     "Failed to interpret y as float");
 
                 WebDriverResponse::WindowRect(RectResponse::new(x, y, width, height))
             },
             GetCookies => {
                 let cookies = try!(self.process_cookies(&resp.result));
-                WebDriverResponse::Cookies(CookiesResponse {value: cookies})
+                WebDriverResponse::Cookie(CookieResponse::new(cookies))
             },
             GetNamedCookie(ref name) => {
                 let mut cookies = try!(self.process_cookies(&resp.result));
                 cookies.retain(|x| x.name == *name);
-                WebDriverResponse::Cookies(CookiesResponse { value : cookies })
+                WebDriverResponse::Cookie(CookieResponse::new(cookies))
             }
             FindElement(_) | FindElementElement(_, _) => {
                 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()))
             },
@@ -899,21 +898,21 @@ impl MarionetteSession {
                                             x.as_u64(),
                                             ErrorStatus::UnknownError,
                                             "Failed to interpret expiry as u64"))))
                                     }));
             let secure = try_opt!(
                 x.find("secure").map_or(Some(false), |x| x.as_boolean()),
                 ErrorStatus::UnknownError,
                 "Failed to interpret secure as boolean");
-            let httpOnly = try_opt!(
+            let http_only = try_opt!(
                 x.find("httpOnly").map_or(Some(false), |x| x.as_boolean()),
                 ErrorStatus::UnknownError,
                 "Failed to interpret httpOnly as boolean");
-            Ok(Cookie {name, value, path, domain, expiry, secure, httpOnly})
+            Ok(Cookie::new(name, value, path, domain, expiry, secure, http_only))
         }).collect::<Result<Vec<_>, _>>()
     }
 
     pub fn error_from_string(&self, error_code: &str) -> ErrorStatus {
         match error_code {
             "element click intercepted" => ErrorStatus::ElementClickIntercepted,
             "element not interactable" | "element not visible" => ErrorStatus::ElementNotInteractable,
             "element not selectable" => ErrorStatus::ElementNotSelectable,