Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: chrome/test/functional/policy.py

Issue 10035043: Update RestoreOnStartupPolicyHandler to translate to the correct preferences (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: \n Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/prefs/session_startup_pref.cc ('k') | chrome/test/functional/policy_test_cases.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/policy.py
diff --git a/chrome/test/functional/policy.py b/chrome/test/functional/policy.py
index 6d6474b80b3867e358593269eafd70992352c094..8622326ad84ff0c683838d24c2e24e56094f315f 100755
--- a/chrome/test/functional/policy.py
+++ b/chrome/test/functional/policy.py
@@ -266,8 +266,10 @@ class PolicyTest(policy_base.PolicyTestBase):
self._RestartRenderer()
self.assertFalse(self._IsWebGLEnabled())
- def testStartupOptions(self):
- """Verify that user cannot modify the startup page options."""
+ def testStartupOptionsURLs(self):
+ """Verify that user cannot modify the startup page options if "Open the
+ following URLs" is set by a policy.
+ """
policy = {
'RestoreOnStartup': 4,
'RestoreOnStartupURLs': ['http://chromium.org']
@@ -278,9 +280,18 @@ class PolicyTest(policy_base.PolicyTestBase):
self.assertRaises(
pyauto.JSONInterfaceError,
lambda: self.SetPrefs(pyauto.kRestoreOnStartup, 1))
- policy['RestoreOnStartup'] = 0
+
+ def testStartupOptionsHomepage(self):
+ """Verify that user cannot modify the startup page options if the
+ deprecated "Open the homepage" option is set by a policy.
+ """
+ policy = {
+ 'RestoreOnStartup': 0,
+ 'HomepageLocation': 'http://chromium.org',
+ 'HomepageIsNewTabPage': False,
+ }
self.SetUserPolicy(policy)
- self.assertEquals(0, self.GetPrefsInfo().Prefs(pyauto.kRestoreOnStartup))
+ self.assertEquals(4, self.GetPrefsInfo().Prefs(pyauto.kRestoreOnStartup))
self.assertRaises(
pyauto.JSONInterfaceError,
lambda: self.SetPrefs(pyauto.kRestoreOnStartup, 1))
« no previous file with comments | « chrome/browser/prefs/session_startup_pref.cc ('k') | chrome/test/functional/policy_test_cases.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698