aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits/webdriver_msg.rs
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2017-01-03 14:07:14 +0100
committerMs2ger <Ms2ger@gmail.com>2017-01-03 14:07:30 +0100
commit2dde348b126796e0811870b23d8b81caefbe3c08 (patch)
treebd2a277a14bee100dfe4bbd384a311b4fbd00774 /components/script_traits/webdriver_msg.rs
parentbf643f535602935dbee768f3296357f194570e4c (diff)
downloadservo-2dde348b126796e0811870b23d8b81caefbe3c08.tar.gz
servo-2dde348b126796e0811870b23d8b81caefbe3c08.zip
Rustfmt script_traits.
Diffstat (limited to 'components/script_traits/webdriver_msg.rs')
-rw-r--r--components/script_traits/webdriver_msg.rs17
1 files changed, 8 insertions, 9 deletions
diff --git a/components/script_traits/webdriver_msg.rs b/components/script_traits/webdriver_msg.rs
index c197b0dfc18..9fe9e9b80f5 100644
--- a/components/script_traits/webdriver_msg.rs
+++ b/components/script_traits/webdriver_msg.rs
@@ -15,7 +15,7 @@ use servo_url::ServoUrl;
#[derive(Deserialize, Serialize)]
pub enum WebDriverScriptCommand {
AddCookie(#[serde(deserialize_with = "::hyper_serde::deserialize",
- serialize_with = "::hyper_serde::serialize")]
+ serialize_with = "::hyper_serde::serialize")]
Cookie,
IpcSender<Result<(), WebDriverCookieError>>),
ExecuteScript(String, IpcSender<WebDriverJSResult>),
@@ -35,13 +35,13 @@ pub enum WebDriverScriptCommand {
GetUrl(IpcSender<ServoUrl>),
IsEnabled(String, IpcSender<Result<bool, ()>>),
IsSelected(String, IpcSender<Result<bool, ()>>),
- GetTitle(IpcSender<String>)
+ GetTitle(IpcSender<String>),
}
#[derive(Deserialize, Serialize)]
pub enum WebDriverCookieError {
InvalidDomain,
- UnableToSetCookie
+ UnableToSetCookie,
}
#[derive(Deserialize, Serialize)]
@@ -50,8 +50,7 @@ pub enum WebDriverJSValue {
Null,
Boolean(bool),
Number(f64),
- String(String),
- // TODO: Object and WebElement
+ String(String), // TODO: Object and WebElement
}
#[derive(Deserialize, Serialize)]
@@ -60,7 +59,7 @@ pub enum WebDriverJSError {
UnknownType,
/// Occurs when handler received an event message for a layout channel that is not
/// associated with the current script thread
- BrowsingContextNotFound
+ BrowsingContextNotFound,
}
pub type WebDriverJSResult = Result<WebDriverJSValue, WebDriverJSError>;
@@ -69,7 +68,7 @@ pub type WebDriverJSResult = Result<WebDriverJSValue, WebDriverJSError>;
pub enum WebDriverFrameId {
Short(u16),
Element(String),
- Parent
+ Parent,
}
impl ToJson for WebDriverJSValue {
@@ -79,7 +78,7 @@ impl ToJson for WebDriverJSValue {
WebDriverJSValue::Null => Json::Null,
WebDriverJSValue::Boolean(ref x) => x.to_json(),
WebDriverJSValue::Number(ref x) => x.to_json(),
- WebDriverJSValue::String(ref x) => x.to_json()
+ WebDriverJSValue::String(ref x) => x.to_json(),
}
}
}
@@ -87,5 +86,5 @@ impl ToJson for WebDriverJSValue {
#[derive(Deserialize, Serialize)]
pub enum LoadStatus {
LoadComplete,
- LoadTimeout
+ LoadTimeout,
}