webdriver: Make all parameters fields public
authorJames Graham <james@hoppipolla.co.uk>
Fri, 24 Apr 2015 14:49:49 +0100
changeset 428022 7e129dba133017df18f26340bd7b0c45c2c8c16c
parent 428021 e8e436f0341fb497453e71d1f0591b1aaa6ac451
child 428023 3390b83855898d75a9b9709a66ecfd84b862d7d9
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone57.0a1
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
webdriver: Make all parameters fields public Source-Repo: https://github.com/mozilla/webdriver-rust Source-Revision: 66547888f47bae7e938a92af4586276479343216
testing/webdriver/src/command.rs
--- a/testing/webdriver/src/command.rs
+++ b/testing/webdriver/src/command.rs
@@ -351,18 +351,18 @@ impl ToJson for GetParameters {
         let mut data = BTreeMap::new();
         data.insert("url".to_string(), self.url.to_json());
         Json::Object(data)
     }
 }
 
 #[derive(PartialEq)]
 pub struct TimeoutsParameters {
-    type_: String,
-    ms: f64
+    pub type_: String,
+    pub ms: f64
 }
 
 impl Parameters for TimeoutsParameters {
     fn from_json(body: &Json) -> WebDriverResult<TimeoutsParameters> {
         let data = try_opt!(body.as_object(), ErrorStatus::UnknownError,
                             "Message body was not an object");
         let type_ = try_opt!(
             try_opt!(data.get("type"),
@@ -390,18 +390,18 @@ impl ToJson for TimeoutsParameters {
         data.insert("type".to_string(), self.type_.to_json());
         data.insert("ms".to_string(), self.ms.to_json());
         Json::Object(data)
     }
 }
 
 #[derive(PartialEq)]
 pub struct WindowSizeParameters {
-    width: u64,
-    height: u64
+    pub width: u64,
+    pub height: u64
 }
 
 impl Parameters for WindowSizeParameters {
     fn from_json(body: &Json) -> WebDriverResult<WindowSizeParameters> {
         let data = try_opt!(body.as_object(), ErrorStatus::UnknownError,
                             "Message body was not an object");
         let height = try_opt!(
             try_opt!(data.get("height"),
@@ -457,18 +457,18 @@ impl ToJson for SwitchToWindowParameters
         let mut data = BTreeMap::new();
         data.insert("handle".to_string(), self.handle.to_json());
         Json::Object(data)
     }
 }
 
 #[derive(PartialEq)]
 pub struct LocatorParameters {
-    using: LocatorStrategy,
-    value: String
+    pub using: LocatorStrategy,
+    pub value: String
 }
 
 impl Parameters for LocatorParameters {
     fn from_json(body: &Json) -> WebDriverResult<LocatorParameters> {
         let data = try_opt!(body.as_object(), ErrorStatus::UnknownError,
                             "Message body was not an object");
 
         let using = try!(LocatorStrategy::from_json(
@@ -569,18 +569,18 @@ impl ToJson for SendKeysParameters {
         }).collect();
         data.insert("value".to_string(), value_string.to_json());
         Json::Object(data)
     }
 }
 
 #[derive(PartialEq)]
 pub struct JavascriptCommandParameters {
-    script: String,
-    args: Nullable<Vec<Json>>
+    pub script: String,
+    pub args: Nullable<Vec<Json>>
 }
 
 impl Parameters for JavascriptCommandParameters {
     fn from_json(body: &Json) -> WebDriverResult<JavascriptCommandParameters> {
         let data = try_opt!(body.as_object(),
                             ErrorStatus::InvalidArgument,
                             "Message body was not an object");
 
@@ -617,17 +617,17 @@ impl ToJson for JavascriptCommandParamet
         data.insert("script".to_string(), self.script.to_json());
         data.insert("args".to_string(), self.args.to_json());
         Json::Object(data)
     }
 }
 
 #[derive(PartialEq)]
 pub struct GetCookieParameters {
-    name: Nullable<String>
+    pub name: Nullable<String>
 }
 
 impl Parameters for GetCookieParameters {
     fn from_json(body: &Json) -> WebDriverResult<GetCookieParameters> {
         let data = try_opt!(body.as_object(), ErrorStatus::InvalidArgument,
                             "Message body was not an object");
         let name_json = try_opt!(data.get("name"),
                                  ErrorStatus::InvalidArgument,