Bug 1529285 - Rename Cookie::httpOnly to ::http_only. r=ato
authorchampionshuttler <shivams2799@gmail.com>
Sat, 09 Mar 2019 13:18:30 +0000
changeset 521262 070e1065af52d1a8ea91a7939a4c6e9263228156
parent 521253 34a3d6b4f10f37b10428063096cad6af7c023e1a
child 521263 c7d8b2c0ada2332e724fc8940d6fb2f38cfc63e0
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1529285
milestone67.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
Bug 1529285 - Rename Cookie::httpOnly to ::http_only. r=ato Differential Revision: https://phabricator.services.mozilla.com/D21662
testing/webdriver/src/common.rs
testing/webdriver/src/response.rs
--- a/testing/webdriver/src/common.rs
+++ b/testing/webdriver/src/common.rs
@@ -10,18 +10,18 @@ pub static MAX_SAFE_INTEGER: u64 = 9_007
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
 pub struct Cookie {
     pub name: String,
     pub value: String,
     pub path: Option<String>,
     pub domain: Option<String>,
     #[serde(default)]
     pub secure: bool,
-    #[serde(default)]
-    pub httpOnly: bool,
+    #[serde(rename = "httpOnly")]
+    pub http_only: bool,
     #[serde(skip_serializing_if = "Option::is_none")]
     pub expiry: Option<Date>,
 }
 
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
 pub struct Date(pub u64);
 
 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
--- a/testing/webdriver/src/response.rs
+++ b/testing/webdriver/src/response.rs
@@ -173,17 +173,17 @@ mod tests {
         }}"#;
         let data = WebDriverResponse::Cookie(CookieResponse(Cookie {
             name: "foo".into(),
             value: "bar".into(),
             path: Some("/".into()),
             domain: Some("foo.bar".into()),
             expiry: Some(Date(123)),
             secure: true,
-            httpOnly: false,
+            http_only: false,
         }));
 
         check_serialize(&json, &data);
     }
 
     #[test]
     fn test_json_cookie_response_without_optional() {
         let json = r#"{"value":{
@@ -196,17 +196,17 @@ mod tests {
         }}"#;
         let data = WebDriverResponse::Cookie(CookieResponse(Cookie {
             name: "foo".into(),
             value: "bar".into(),
             path: Some("/".into()),
             domain: None,
             expiry: None,
             secure: true,
-            httpOnly: false,
+            http_only: false,
         }));
 
         check_serialize(&json, &data);
     }
 
     #[test]
     fn test_json_cookies_response() {
         let json = r#"{"value":[{
@@ -219,17 +219,17 @@ mod tests {
         }]}"#;
         let data = WebDriverResponse::Cookies(CookiesResponse(vec![Cookie {
             name: "name".into(),
             value: "value".into(),
             path: Some("/".into()),
             domain: None,
             expiry: None,
             secure: true,
-            httpOnly: false,
+            http_only: false,
         }]));
 
         check_serialize(&json, &data);
     }
 
     #[test]
     fn test_json_delete_session_response() {
         let json = r#"{"value":null}"#;