From f38299c32f5ec26676f523911248522c85b732f9 Mon Sep 17 00:00:00 2001 From: Andreas Tolfsen Date: Sat, 9 Sep 2017 16:58:54 +0100 Subject: [PATCH] Bug 1398450 - Fix prefs test regression. r=jgraham The marionette.defaultPrefs.port preference was changed to marionette.port, but because we currently do not run tests in CI we missed updating the test. MozReview-Commit-ID: LKstRYmJcMO --HG-- extra : rebase_source : 1633b5b82c3c8725ff66423119d7c476fa942b01 --- testing/geckodriver/src/capabilities.rs | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/testing/geckodriver/src/capabilities.rs b/testing/geckodriver/src/capabilities.rs index dedf6f4ff6eb..9f70c4cd139d 100644 --- a/testing/geckodriver/src/capabilities.rs +++ b/testing/geckodriver/src/capabilities.rs @@ -494,8 +494,10 @@ mod tests { fn test_prefs() { let encoded_profile = example_profile(); let mut prefs: BTreeMap = BTreeMap::new(); - prefs.insert("browser.display.background_color".into(), - Json::String("#00ff00".into())); + prefs.insert( + "browser.display.background_color".into(), + Json::String("#00ff00".into()), + ); let mut firefox_opts = Capabilities::new(); firefox_opts.insert("profile".into(), encoded_profile); @@ -512,11 +514,14 @@ mod tests { let prefs_set = profile.user_prefs().unwrap(); println!("{:#?}", prefs_set.prefs); - assert_eq!(prefs_set.get("startup.homepage_welcome_url"), - Some(&Pref::new("data:text/html,PASS"))); - assert_eq!(prefs_set.get("browser.display.background_color"), - Some(&Pref::new("#00ff00"))); - assert_eq!(prefs_set.get("marionette.defaultPrefs.port"), - Some(&Pref::new(2828))); + assert_eq!( + prefs_set.get("startup.homepage_welcome_url"), + Some(&Pref::new("data:text/html,PASS")) + ); + assert_eq!( + prefs_set.get("browser.display.background_color"), + Some(&Pref::new("#00ff00")) + ); + assert_eq!(prefs_set.get("marionette.port"), Some(&Pref::new(2828))); } }