geckodriver: Permit Json::U64 when validating prefs in moz:firefoxOptions (#658)
authorJason Juang <juangj@gmail.com>
Thu, 20 Apr 2017 11:27:43 +0100
changeset 581802 cebf2660fbf20f3f5f756879888cadf28d9625c5
parent 581801 406472929f185e41566506eb92e4a05a98e229c1
child 581803 3d132ed99b5c470ffea425c95eb27629ca31a99f
push id59896
push userhikezoe@mozilla.com
push dateFri, 19 May 2017 23:30:01 +0000
milestone55.0a1
geckodriver: Permit Json::U64 when validating prefs in moz:firefoxOptions (#658) Source-Repo: https://github.com/mozilla/geckodriver Source-Revision: 94e218746a7f5c56a551eb4f21a20ff575ca128a committer: Andreas Tolfsen <ato@mozilla.com>
testing/geckodriver/src/capabilities.rs
--- a/testing/geckodriver/src/capabilities.rs
+++ b/testing/geckodriver/src/capabilities.rs
@@ -184,17 +184,17 @@ impl<'a> BrowserCapabilities for Firefox
                                 }
                             }
                         },
                         "prefs" => {
                             let prefs_data = try_opt!(value.as_object(),
                                                     ErrorStatus::InvalidArgument,
                                                     "prefs value is not an object");
                             if !prefs_data.values()
-                                .all(|x| x.is_string() || x.is_i64() || x.is_boolean()) {
+                                .all(|x| x.is_string() || x.is_i64() || x.is_u64() || x.is_boolean()) {
                                     return Err(WebDriverError::new(
                                         ErrorStatus::InvalidArgument,
                                         "Preference values not all string or integer or boolean"));
                                 }
                         }
                         x => return Err(WebDriverError::new(
                             ErrorStatus::InvalidArgument,
                             format!("Invalid moz:firefoxOptions field {}", x)))