geckodriver: cargo, geckodriver, marionette: upgrade to webdriver v0.20 (#448)

Source-Repo: https://github.com/mozilla/geckodriver
Source-Revision: 6c161a2fe3cff818bcb5cf30cee92256229926de

committer: GitHub <noreply@github.com>

--HG--
extra : rebase_source : de2246bbe0a2f177ea11a7264622184bbd96b481
This commit is contained in:
Andreas Tolfsen 2017-01-30 17:15:47 +00:00
Родитель 81a611cd82
Коммит 42e6702c3c
4 изменённых файлов: 110 добавлений и 56 удалений

90
testing/geckodriver/Cargo.lock сгенерированный
Просмотреть файл

@ -9,14 +9,14 @@ dependencies = [
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"mozprofile 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"mozrunner 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
"slog 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"slog-atomic 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"slog-stdlog 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"slog-stream 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
"webdriver 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
"webdriver 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
"zip 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -31,10 +31,33 @@ dependencies = [
[[package]]
name = "aho-corasick"
version = "0.5.3"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
"memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "backtrace"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace-sys 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-demangle 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "backtrace-sys"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.41 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -60,6 +83,11 @@ dependencies = [
"libc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "cfg-if"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "chrono"
version = "0.2.25"
@ -97,6 +125,15 @@ name = "crossbeam"
version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "dbghelp-sys"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "flate2"
version = "0.2.14"
@ -223,7 +260,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "memchr"
version = "0.1.11"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
@ -331,19 +368,24 @@ dependencies = [
[[package]]
name = "regex"
version = "0.1.80"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
"memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
"regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"aho-corasick 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"regex-syntax 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"thread_local 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "regex-syntax"
version = "0.3.9"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "rustc-demangle"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@ -558,7 +600,7 @@ dependencies = [
[[package]]
name = "utf8-ranges"
version = "0.1.3"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@ -582,13 +624,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "webdriver"
version = "0.18.0"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.14 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -629,14 +672,18 @@ dependencies = [
[metadata]
"checksum advapi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "307c92332867e586720c0222ee9d890bbe8431711efed8a1b06bc5b40fc66bd7"
"checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66"
"checksum aho-corasick 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4f660b942762979b56c9f07b4b36bb559776fbad102f05d6771e1b629e8fd5bf"
"checksum backtrace 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80"
"checksum backtrace-sys 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3602e8d8c43336088a8505fa55cae2b3884a9be29440863a11528a42f46f6bb7"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
"checksum bzip2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c30a578393daf45ee6101aa043afa8d47a7e70f05032b15b88b28a7111c6a53"
"checksum bzip2-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "81c91586be5d862524de53126d49c11fef83dc1a8e8034235f37372e3b2da311"
"checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c"
"checksum chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "9213f7cd7c27e95c2b57c49f0e69b1ea65b27138da84a170133fd21b07659c00"
"checksum clap 2.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dd1cb22651881e6379f4492d0d572ecb8022faef8c8aaae285bb18cb307bfa30"
"checksum cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e3d6405328b6edb412158b3b7710e2634e23f3614b9bb1c412df7952489a626"
"checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97"
"checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850"
"checksum flate2 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "3eeb481e957304178d2e782f2da1257f1434dfecbae883bafb61ada2a9fea3bb"
"checksum gcc 0.3.41 (registry+https://github.com/rust-lang/crates.io-index)" = "3689e1982a563af74960ae3a4758aa632bb8fd984cfc3cc3b60ee6109477ab6e"
"checksum hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d2da7d3a34cf6406d9d700111b8eafafe9a251de41ae71d8052748259343b58"
@ -653,7 +700,7 @@ dependencies = [
"checksum libc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "a51822fc847e7a8101514d1d44e354ba2ffa7d4c194dcab48870740e327cac70"
"checksum log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ab83497bf8bf4ed2a74259c1c802351fcd67a65baa86394b6ba73c36f4838054"
"checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1"
"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20"
"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
"checksum mime 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5c93a4bd787ddc6e7833c519b73a50883deb5863d76d9b71eb8216fb7f94e66"
"checksum miniz-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d1f4d337a01c32e1f2122510fed46393d53ca35a7f429cb0450abaedfa3ed54"
"checksum mozprofile 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "01177c10a9a0a905d6b21dc6d994186f941c9b15fe1034a4b62d440fddc83c81"
@ -666,8 +713,9 @@ dependencies = [
"checksum num_cpus 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a225d1e2717567599c24f88e49f00856c6e825a12125181ee42c4257e3688d39"
"checksum podio 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e5422a1ee1bc57cc47ae717b0137314258138f38fd5f3cea083f43a9725383a0"
"checksum rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "022e0636ec2519ddae48154b028864bdce4eaf7d35226ab8e65c611be97b189d"
"checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f"
"checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957"
"checksum regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4278c17d0f6d62dfef0ab00028feb45bd7d2102843f80763474eeb1be8a10c01"
"checksum regex-syntax 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9191b1f57603095f105d317e375d19b1c9c5c3185ea9633a99a6dcbed04457"
"checksum rustc-demangle 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1430d286cadb237c17c885e25447c982c97113926bb579f4379c0eca8d9586dc"
"checksum rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "237546c689f20bb44980270c73c3b9edd0891c1be49cc1274406134a66d3957b"
"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084"
"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac"
@ -695,11 +743,11 @@ dependencies = [
"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f"
"checksum unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91"
"checksum url 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f024e241a55f5c88401595adc1d4af0c9649e91da82d0e190fe55950231ae575"
"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f"
"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
"checksum uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "78c590b5bd79ed10aad8fb75f078a59d8db445af6c743e55c4a53227fc01c13f"
"checksum vec_map 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cac5efe5cb0fa14ec2f84f83c701c562ee63f6dcc680861b21d65c682adfb05f"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
"checksum webdriver 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8cf640310f06947d2b464bc3186dfc70900250d0d921118bb891ac69add16887"
"checksum webdriver 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cdc28802daddee94267a657ffeac2593a33881fb7a3a44fedd320b1319efcaf6"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
"checksum winreg 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e63857fb213f619b4c4fff86b158285c76766aac7e7474967e92fb6dbbfeefe9"

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

@ -19,12 +19,12 @@ lazy_static = "0.1"
log = "0.3"
mozprofile = "0.2"
mozrunner = "0.3"
regex = "0.1.47"
regex = "0.2"
rustc-serialize = "0.3.16"
slog = "1"
slog-atomic = "0.4"
slog-stdlog = "1"
slog-stream = "1"
uuid = "0.1.18"
webdriver = "0.18"
webdriver = "0.20"
zip = "0.1.16"

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

@ -14,7 +14,6 @@ extern crate slog_atomic;
extern crate slog_stdlog;
extern crate slog_stream;
extern crate zip;
#[macro_use]
extern crate webdriver;
#[macro_use]

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

@ -31,14 +31,14 @@ use webdriver::command::WebDriverCommand::{
IsDisplayed, IsSelected, GetElementAttribute, GetElementProperty, GetCSSValue,
GetElementText, GetElementTagName, GetElementRect, IsEnabled,
ElementClick, ElementTap, ElementClear, ElementSendKeys,
ExecuteScript, ExecuteAsyncScript, GetCookies, GetCookie, AddCookie,
ExecuteScript, ExecuteAsyncScript, GetCookies, GetNamedCookie, AddCookie,
DeleteCookies, DeleteCookie, GetTimeouts, SetTimeouts, DismissAlert,
AcceptAlert, GetAlertText, SendAlertText, TakeScreenshot, TakeElementScreenshot,
Extension, SetWindowPosition, GetWindowPosition, PerformActions, ReleaseActions};
use webdriver::command::{
NewSessionParameters, GetParameters, WindowSizeParameters, SwitchToWindowParameters,
SwitchToFrameParameters, LocatorParameters, JavascriptCommandParameters,
GetCookieParameters, AddCookieParameters, TimeoutsParameters,
GetNamedCookieParameters, AddCookieParameters, TimeoutsParameters,
ActionsParameters, TakeScreenshotParameters, WindowPositionParameters};
use webdriver::response::{
WebDriverResponse, NewSessionResponse, ValueResponse, WindowSizeResponse,
@ -75,29 +75,27 @@ impl WebDriverExtensionRoute for GeckoExtensionRoute {
fn command(&self,
captures: &Captures,
body_data: &Json) -> WebDriverResult<WebDriverCommand<GeckoExtensionCommand>> {
body_data: &Json)
-> WebDriverResult<WebDriverCommand<GeckoExtensionCommand>> {
let command = match self {
&GeckoExtensionRoute::GetContext => {
GeckoExtensionCommand::GetContext
}
&GeckoExtensionRoute::GetContext => GeckoExtensionCommand::GetContext,
&GeckoExtensionRoute::SetContext => {
let parameters: GeckoContextParameters = try!(Parameters::from_json(&body_data));
GeckoExtensionCommand::SetContext(parameters)
},
}
&GeckoExtensionRoute::XblAnonymousChildren => {
let element_id = try!(captures.name("elementId")
.ok_or(WebDriverError::new(
ErrorStatus::InvalidArgument,
"Missing elementId parameter")));
GeckoExtensionCommand::XblAnonymousChildren(element_id.into())
},
.ok_or(WebDriverError::new(ErrorStatus::InvalidArgument,
"Missing elementId parameter")));
GeckoExtensionCommand::XblAnonymousChildren(element_id.as_str().into())
}
&GeckoExtensionRoute::XblAnonymousByAttribute => {
let element_id = try!(captures.name("elementId")
.ok_or(WebDriverError::new(
ErrorStatus::InvalidArgument,
"Missing elementId parameter")));
.ok_or(WebDriverError::new(ErrorStatus::InvalidArgument,
"Missing elementId parameter")));
let parameters: AttributeParameters = try!(Parameters::from_json(&body_data));
GeckoExtensionCommand::XblAnonymousByAttribute(element_id.into(), parameters)
GeckoExtensionCommand::XblAnonymousByAttribute(element_id.as_str().into(),
parameters)
}
};
Ok(WebDriverCommand::Extension(command))
@ -607,7 +605,7 @@ impl MarionetteSession {
let cookies = try!(self.process_cookies(&resp.result));
WebDriverResponse::Cookie(CookieResponse::new(cookies))
},
GetCookie(ref name) => {
GetNamedCookie(ref name) => {
let mut cookies = try!(self.process_cookies(&resp.result));
cookies.retain(|x| x.name == *name);
WebDriverResponse::Cookie(CookieResponse::new(cookies))
@ -872,7 +870,7 @@ impl MarionetteCommand {
},
ExecuteScript(ref x) => (Some("executeScript"), Some(x.to_marionette())),
ExecuteAsyncScript(ref x) => (Some("executeAsyncScript"), Some(x.to_marionette())),
GetCookies | GetCookie(_) => (Some("getCookies"), None),
GetCookies | GetNamedCookie(_) => (Some("getCookies"), None),
DeleteCookies => (Some("deleteAllCookies"), None),
DeleteCookie(ref x) => {
let mut data = BTreeMap::new();
@ -1139,9 +1137,11 @@ impl MarionetteConnection {
format!("{}:{}", data.len(), data)
}
pub fn send_command(&mut self, msg: &WebDriverMessage<GeckoExtensionRoute>) -> WebDriverResult<WebDriverResponse> {
let command = try!(MarionetteCommand::from_webdriver_message(
self.session.next_command_id(), msg));
pub fn send_command(&mut self,
msg: &WebDriverMessage<GeckoExtensionRoute>)
-> WebDriverResult<WebDriverResponse> {
let id = self.session.next_command_id();
let command = try!(MarionetteCommand::from_webdriver_message(id, msg));
let resp_data = try!(self.send(command.to_json()));
let json_data: Json = try!(Json::from_str(&*resp_data));
@ -1158,23 +1158,23 @@ impl MarionetteConnection {
if stream.write(&*data.as_bytes()).is_err() {
let mut err = WebDriverError::new(ErrorStatus::UnknownError,
"Failed to write response to stream");
err.set_delete_session();
err.delete_session = true;
return Err(err);
}
},
}
None => {
let mut err = WebDriverError::new(ErrorStatus::UnknownError,
"Tried to write before opening stream");
err.set_delete_session();
err.delete_session = true;
return Err(err);
}
}
match self.read_resp() {
Ok(resp) => Ok(resp),
Err(_) => {
let mut err = WebDriverError::new(
ErrorStatus::UnknownError, "Failed to decode response from marionette");
err.set_delete_session();
let mut err = WebDriverError::new(ErrorStatus::UnknownError,
"Failed to decode response from marionette");
err.delete_session = true;
Err(err)
}
}
@ -1269,7 +1269,10 @@ impl ToMarionette for SwitchToWindowParameters {
impl ToMarionette for LocatorParameters {
fn to_marionette(&self) -> WebDriverResult<BTreeMap<String, Json>> {
Ok(try_opt!(self.to_json().as_object(), ErrorStatus::UnknownError, "Expected an object").clone())
Ok(try_opt!(self.to_json().as_object(),
ErrorStatus::UnknownError,
"Expected an object")
.clone())
}
}
@ -1279,7 +1282,7 @@ impl ToMarionette for SwitchToFrameParameters {
let key = match self.id {
FrameId::Null => None,
FrameId::Short(_) => Some("id"),
FrameId::Element(_) => Some("element")
FrameId::Element(_) => Some("element"),
};
if let Some(x) = key {
data.insert(x.to_string(), self.id.to_json());
@ -1302,13 +1305,17 @@ impl ToMarionette for ActionsParameters {
fn to_marionette(&self) -> WebDriverResult<BTreeMap<String, Json>> {
Ok(try_opt!(self.to_json().as_object(),
ErrorStatus::UnknownError,
"Expected an object").clone())
"Expected an object")
.clone())
}
}
impl ToMarionette for GetCookieParameters {
impl ToMarionette for GetNamedCookieParameters {
fn to_marionette(&self) -> WebDriverResult<BTreeMap<String, Json>> {
Ok(try_opt!(self.to_json().as_object(), ErrorStatus::UnknownError, "Expected an object").clone())
Ok(try_opt!(self.to_json().as_object(),
ErrorStatus::UnknownError,
"Expected an object")
.clone())
}
}