Backed out changeset 9f4ce21f8652 (bug 1371405)

This commit is contained in:
Sebastian Hengst 2017-06-20 21:23:09 +02:00
Родитель d4d94c196f
Коммит 319bdce422
1 изменённых файлов: 6 добавлений и 8 удалений

Просмотреть файл

@ -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::<Result<Vec<_>, _>>()
}