diff options
author | dyu@chromium.org <dyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-17 23:20:12 +0000 |
---|---|---|
committer | dyu@chromium.org <dyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-17 23:20:12 +0000 |
commit | a2b600c5b2175571888da48f76adec7bc80b8b9d (patch) | |
tree | 891cdbb136809568ca2fb2f926b6f443190b9be1 | |
parent | 3d46d2170fb47224803f62b3baac3e4afe786204 (diff) | |
download | chromium_src-a2b600c5b2175571888da48f76adec7bc80b8b9d.zip chromium_src-a2b600c5b2175571888da48f76adec7bc80b8b9d.tar.gz chromium_src-a2b600c5b2175571888da48f76adec7bc80b8b9d.tar.bz2 |
Added new pyauto tests within prefs.py
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/5104001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66540 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/test/functional/prefs.py | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/chrome/test/functional/prefs.py b/chrome/test/functional/prefs.py index 3cb54da..2cf9edc 100644 --- a/chrome/test/functional/prefs.py +++ b/chrome/test/functional/prefs.py @@ -107,14 +107,14 @@ class PrefsTest(pyauto.PyUITest): shutil.rmtree(new_dl_dir, ignore_errors=True) # cleanup def testToolbarButtonsPref(self): - """Verify toolbar buttons prefs..""" + """Verify toolbar buttons prefs.""" # Assert defaults first self.assertFalse(self.GetPrefsInfo().Prefs(pyauto.kShowHomeButton)) self.SetPrefs(pyauto.kShowHomeButton, True) self.RestartBrowser(clear_profile=False) self.assertTrue(self.GetPrefsInfo().Prefs(pyauto.kShowHomeButton)) - def testDnsPrefectchingEnabledPref(self): + def testDnsPrefetchingEnabledPref(self): """Verify DNS prefetching pref.""" # Assert default self.assertTrue(self.GetPrefsInfo().Prefs(pyauto.kDnsPrefetchingEnabled)) @@ -160,6 +160,20 @@ class PrefsTest(pyauto.PyUITest): self.assertTrue(self.WaitForInfobarCount(0)) self.assertFalse(self.GetBrowserInfo()['windows'][0]['tabs'][0]['infobars']) + def testUnderTheHoodPref(self): + """Verify the security preferences for Under the Hood. + The setting is enabled by default.""" + pref_list = [pyauto.kDnsPrefetchingEnabled, pyauto.kSafeBrowsingEnabled, + pyauto.kAlternateErrorPagesEnabled, + pyauto.kSearchSuggestEnabled, pyauto.kShowOmniboxSearchHint] + for pref in pref_list: + # Verify the default value + self.assertEqual(self.GetPrefsInfo().Prefs(pref), True) + self.SetPrefs(pref, False) + self.RestartBrowser(clear_profile=False) + for pref in pref_list: + self.assertEqual(self.GetPrefsInfo().Prefs(pref), False) + if __name__ == '__main__': pyauto_functional.Main() |