diff --git a/testing/geckodriver/src/marionette.rs b/testing/geckodriver/src/marionette.rs index 6560cc7ed28b..040afb924191 100644 --- a/testing/geckodriver/src/marionette.rs +++ b/testing/geckodriver/src/marionette.rs @@ -40,9 +40,8 @@ use webdriver::command::{ 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}; @@ -737,7 +736,7 @@ impl MarionetteSession { 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, @@ -770,12 +769,12 @@ impl MarionetteSession { }, 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( @@ -908,8 +907,7 @@ impl MarionetteSession { x.find("httpOnly").map_or(Some(false), |x| x.as_boolean()), ErrorStatus::UnknownError, "Failed to interpret httpOnly as boolean"); - Ok(Cookie {name: name , value: value, path: path, domain: domain, - expiry: expiry, secure: secure , httpOnly: http_only}) + Ok(Cookie::new(name, value, path, domain, expiry, secure, http_only)) }).collect::, _>>() }