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

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

Issue 9696018: Update pyauto tests to work with the uber page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: rebase Created 8 years, 9 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/functional/history.py ('k') | chrome/test/functional/policy_prefs_ui.py » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 self.assertTrue(self.IsMenuCommandEnabled(pyauto.IDC_DEV_TOOLS_CONSOLE)) 169 self.assertTrue(self.IsMenuCommandEnabled(pyauto.IDC_DEV_TOOLS_CONSOLE))
170 170
171 # The Developer Tools still work when javascript is disabled. 171 # The Developer Tools still work when javascript is disabled.
172 policy['JavascriptEnabled'] = False 172 policy['JavascriptEnabled'] = False
173 self.SetPolicies(policy) 173 self.SetPolicies(policy)
174 self.NavigateToURL('about:blank') 174 self.NavigateToURL('about:blank')
175 self.assertFalse(self._IsJavascriptEnabled()) 175 self.assertFalse(self._IsJavascriptEnabled())
176 self.assertTrue(self.IsMenuCommandEnabled(pyauto.IDC_DEV_TOOLS)) 176 self.assertTrue(self.IsMenuCommandEnabled(pyauto.IDC_DEV_TOOLS))
177 self.assertTrue(self.IsMenuCommandEnabled(pyauto.IDC_DEV_TOOLS_CONSOLE)) 177 self.assertTrue(self.IsMenuCommandEnabled(pyauto.IDC_DEV_TOOLS_CONSOLE))
178 # Javascript is always enabled for internal Chrome pages. 178 # Javascript is always enabled for internal Chrome pages.
179 self.NavigateToURL('chrome://settings') 179 self.NavigateToURL('chrome://settings-frame')
180 self.assertTrue(self._IsJavascriptEnabled()) 180 self.assertTrue(self._IsJavascriptEnabled())
181 181
182 # The Developer Tools can be explicitly disabled. 182 # The Developer Tools can be explicitly disabled.
183 policy['DeveloperToolsDisabled'] = True 183 policy['DeveloperToolsDisabled'] = True
184 self.SetPolicies(policy) 184 self.SetPolicies(policy)
185 self.NavigateToURL('about:blank') 185 self.NavigateToURL('about:blank')
186 self.assertFalse(self._IsJavascriptEnabled()) 186 self.assertFalse(self._IsJavascriptEnabled())
187 self.assertFalse(self.IsMenuCommandEnabled(pyauto.IDC_DEV_TOOLS)) 187 self.assertFalse(self.IsMenuCommandEnabled(pyauto.IDC_DEV_TOOLS))
188 self.assertFalse(self.IsMenuCommandEnabled(pyauto.IDC_DEV_TOOLS_CONSOLE)) 188 self.assertFalse(self.IsMenuCommandEnabled(pyauto.IDC_DEV_TOOLS_CONSOLE))
189 189
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 # Give the system 30 seconds to go get this extension. We are not sure how 686 # Give the system 30 seconds to go get this extension. We are not sure how
687 # long it will take the policy to take affect and download the extension. 687 # long it will take the policy to take affect and download the extension.
688 self.assertTrue(self.WaitUntil(lambda: 688 self.assertTrue(self.WaitUntil(lambda:
689 self._CheckForExtensionByID(self._SCREEN_CAPTURE_CRX_ID), 689 self._CheckForExtensionByID(self._SCREEN_CAPTURE_CRX_ID),
690 expect_retval=True), 690 expect_retval=True),
691 msg='The force install extension was never installed.') 691 msg='The force install extension was never installed.')
692 692
693 693
694 if __name__ == '__main__': 694 if __name__ == '__main__':
695 pyauto_functional.Main() 695 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/history.py ('k') | chrome/test/functional/policy_prefs_ui.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698