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

Side by Side Diff: chrome/test/functional/prefs.py

Issue 10409046: Migrate the rest of the "global" prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/data/profiles/webkit_global_reverse_migration/Default/Preferences ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import logging 6 import logging
7 import os 7 import os
8 import shutil 8 import shutil
9 9
10 import pyauto_functional # Must be imported before pyauto 10 import pyauto_functional # Must be imported before pyauto
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 # Verify the default value 181 # Verify the default value
182 self.assertEqual(self.GetPrefsInfo().Prefs(pref), True) 182 self.assertEqual(self.GetPrefsInfo().Prefs(pref), True)
183 self.SetPrefs(pref, False) 183 self.SetPrefs(pref, False)
184 self.RestartBrowser(clear_profile=False) 184 self.RestartBrowser(clear_profile=False)
185 for pref in pref_list: 185 for pref in pref_list:
186 self.assertEqual(self.GetPrefsInfo().Prefs(pref), False) 186 self.assertEqual(self.GetPrefsInfo().Prefs(pref), False)
187 187
188 def testJavaScriptEnableDisable(self): 188 def testJavaScriptEnableDisable(self):
189 """Verify enabling disabling javascript prefs work """ 189 """Verify enabling disabling javascript prefs work """
190 self.assertTrue( 190 self.assertTrue(
191 self.GetPrefsInfo().Prefs(pyauto.kWebKitGlobalJavascriptEnabled)) 191 self.GetPrefsInfo().Prefs(pyauto.kWebKitJavascriptEnabled))
192 url = self.GetFileURLForDataPath( 192 url = self.GetFileURLForDataPath(
193 os.path.join('javaScriptTitle.html')) 193 os.path.join('javaScriptTitle.html'))
194 title1 = 'Title from script javascript enabled' 194 title1 = 'Title from script javascript enabled'
195 self.NavigateToURL(url) 195 self.NavigateToURL(url)
196 self.assertEqual(title1, self.GetActiveTabTitle()) 196 self.assertEqual(title1, self.GetActiveTabTitle())
197 self.SetPrefs(pyauto.kWebKitGlobalJavascriptEnabled, False) 197 self.SetPrefs(pyauto.kWebKitJavascriptEnabled, False)
198 title = 'This is html title' 198 title = 'This is html title'
199 self.NavigateToURL(url) 199 self.NavigateToURL(url)
200 self.assertEqual(title, self.GetActiveTabTitle()) 200 self.assertEqual(title, self.GetActiveTabTitle())
201 201
202 def testHaveLocalStatePrefs(self): 202 def testHaveLocalStatePrefs(self):
203 """Verify that we have some Local State prefs.""" 203 """Verify that we have some Local State prefs."""
204 self.assertTrue(self.GetLocalStatePrefsInfo()) 204 self.assertTrue(self.GetLocalStatePrefsInfo())
205 205
206 def testAllowSelectedGeoTracking(self): 206 def testAllowSelectedGeoTracking(self):
207 """Verify hostname pattern and behavior for allowed tracking.""" 207 """Verify hostname pattern and behavior for allowed tracking."""
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 self, self.INFOBAR_TYPE)) 342 self, self.INFOBAR_TYPE))
343 driver = self.NewWebDriver() 343 driver = self.NewWebDriver()
344 driver.find_element_by_id('test_protocol').click() 344 driver.find_element_by_id('test_protocol').click()
345 self.assertTrue( 345 self.assertTrue(
346 driver.execute_script('return verifyQueryConformsToProtocol();'), 346 driver.execute_script('return verifyQueryConformsToProtocol();'),
347 msg='Protocol did not register correctly.') 347 msg='Protocol did not register correctly.')
348 348
349 349
350 if __name__ == '__main__': 350 if __name__ == '__main__':
351 pyauto_functional.Main() 351 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « chrome/test/data/profiles/webkit_global_reverse_migration/Default/Preferences ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698