Bug 1330282 - Fix test_get_pref_value_type() for Fennec. draft
authorHenrik Skupin <mail@hskupin.info>
Wed, 11 Jan 2017 12:42:02 +0100
changeset 458961 cc87553ca6f38c8e81c8c2cd869dd01f8db9ba45
parent 458771 2963cf6be7f830c0d2155e2968cfc53585868a76
child 541808 aa220231f2621403209bfd67c9a71a1e3d0f198a
push id41130
push userbmo:hskupin@gmail.com
push dateWed, 11 Jan 2017 11:42:33 +0000
bugs1330282
milestone53.0a1
Bug 1330282 - Fix test_get_pref_value_type() for Fennec. The preference "browser.startup.homepage" is only used for Firefox, so the test fails for Fennec. By using "browser.menu.showCharacterEncoding" which is used in both Firefox and Fennec the test is passing. MozReview-Commit-ID: 3PrPAgtU60u
testing/marionette/harness/marionette_harness/tests/unit/test_prefs.py
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_prefs.py
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_prefs.py
@@ -71,18 +71,18 @@ class TestPreferences(MarionetteTestCase
         self.assertEqual(self.marionette.get_pref(pref_default, default_branch=True),
                          "default_value")
 
         self.marionette.clear_pref(pref_default)
         self.assertEqual(self.marionette.get_pref(pref_default), "default_value")
 
     def test_get_pref_value_type(self):
         # Without a given value type the properties URL will be returned only
-        pref_complex = "browser.startup.homepage"
-        properties_file = "chrome://branding/locale/browserconfig.properties"
+        pref_complex = "browser.menu.showCharacterEncoding"
+        properties_file = "chrome://browser/locale/browser.properties"
         self.assertEqual(self.marionette.get_pref(pref_complex, default_branch=True),
                          properties_file)
 
         # Otherwise the property named like the pref will be translated
         value = self.marionette.get_pref(pref_complex, default_branch=True,
                                          value_type="nsIPrefLocalizedString")
         self.assertNotEqual(value, properties_file)