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

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

Issue 10255022: Revert 134389 - Fix an incorrectly written policy test. It was using a hook incorrectly and checkin… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | « no previous file | 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 8
9 import pyauto_functional # must come before pyauto. 9 import pyauto_functional # must come before pyauto.
10 import policy_base 10 import policy_base
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 self.assertTrue('search.my.company' in self.GetActiveTabURL().spec()) 523 self.assertTrue('search.my.company' in self.GetActiveTabURL().spec())
524 policy = { 524 policy = {
525 'DefaultSearchProviderEnabled': False, 525 'DefaultSearchProviderEnabled': False,
526 } 526 }
527 self.SetUserPolicy(policy) 527 self.SetUserPolicy(policy)
528 self.assertFalse( 528 self.assertFalse(
529 self._GetPrefIsManagedError(pyauto.kDefaultSearchProviderEnabled, 529 self._GetPrefIsManagedError(pyauto.kDefaultSearchProviderEnabled,
530 False)) 530 False))
531 self.SetOmniboxText('deli') 531 self.SetOmniboxText('deli')
532 self.WaitUntilOmniboxQueryDone() 532 self.WaitUntilOmniboxQueryDone()
533 self.OmniboxAcceptInput() 533 self.assertRaises(pyauto.JSONInterfaceError,
534 self.assertFalse('search.my.company' in self.GetActiveTabURL().spec()) 534 lambda: self.OmniboxAcceptInput())
535 535
536 # Needed for extension tests 536 # Needed for extension tests
537 _GOOD_CRX_ID = 'ldnnhddmnhbkjipkidpdiheffobcpfmf' 537 _GOOD_CRX_ID = 'ldnnhddmnhbkjipkidpdiheffobcpfmf'
538 _ADBLOCK_CRX_ID = 'dojnnbeimaimaojcialkkgajdnefpgcn' 538 _ADBLOCK_CRX_ID = 'dojnnbeimaimaojcialkkgajdnefpgcn'
539 _SCREEN_CAPTURE_CRX_ID = 'cpngackimfmofbokmjmljamhdncknpmg' 539 _SCREEN_CAPTURE_CRX_ID = 'cpngackimfmofbokmjmljamhdncknpmg'
540 540
541 def _BuildCRXPath(self, crx_file_name): 541 def _BuildCRXPath(self, crx_file_name):
542 """Returns the complete path to a crx_file in the data directory. 542 """Returns the complete path to a crx_file in the data directory.
543 543
544 Args: 544 Args:
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 # Give the system 30 seconds to go get this extension. We are not sure how 658 # Give the system 30 seconds to go get this extension. We are not sure how
659 # long it will take the policy to take affect and download the extension. 659 # long it will take the policy to take affect and download the extension.
660 self.assertTrue(self.WaitUntil(lambda: 660 self.assertTrue(self.WaitUntil(lambda:
661 self._CheckForExtensionByID(self._SCREEN_CAPTURE_CRX_ID), 661 self._CheckForExtensionByID(self._SCREEN_CAPTURE_CRX_ID),
662 expect_retval=True), 662 expect_retval=True),
663 msg='The force install extension was never installed.') 663 msg='The force install extension was never installed.')
664 664
665 665
666 if __name__ == '__main__': 666 if __name__ == '__main__':
667 pyauto_functional.Main() 667 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698