| OLD | NEW |
| 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 """PyAuto: Python Interface to Chromium's Automation Proxy. | 6 """PyAuto: Python Interface to Chromium's Automation Proxy. |
| 7 | 7 |
| 8 PyAuto uses swig to expose Automation Proxy interfaces to Python. | 8 PyAuto uses swig to expose Automation Proxy interfaces to Python. |
| 9 For complete documentation on the functionality available, | 9 For complete documentation on the functionality available, |
| 10 run pydoc on this file. | 10 run pydoc on this file. |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 return [ | 244 return [ |
| 245 '--homepage=about:blank', | 245 '--homepage=about:blank', |
| 246 '--allow-file-access', | 246 '--allow-file-access', |
| 247 '--allow-file-access-from-files', | 247 '--allow-file-access-from-files', |
| 248 '--enable-file-cookies', | 248 '--enable-file-cookies', |
| 249 '--dom-automation', | 249 '--dom-automation', |
| 250 '--skip-oauth-login', | 250 '--skip-oauth-login', |
| 251 # Enables injection of test content script for webui login automation | 251 # Enables injection of test content script for webui login automation |
| 252 '--auth-ext-path=/usr/share/chromeos-assets/gaia_auth', | 252 '--auth-ext-path=/usr/share/chromeos-assets/gaia_auth', |
| 253 # Enable automation provider and chromeos net logs | 253 # Enable automation provider and chromeos net logs |
| 254 '--vmodule=*/browser/automation/*=2,*/chromeos/net/*=2,*/renderer_host/r
esource_dispatcher_host*=1', | 254 '--vmodule=*/browser/automation/*=2,*/chromeos/net/*=2', |
| 255 ] | 255 ] |
| 256 else: | 256 else: |
| 257 return [] | 257 return [] |
| 258 | 258 |
| 259 def CloseChromeOnChromeOS(self): | 259 def CloseChromeOnChromeOS(self): |
| 260 """Gracefully exit chrome on ChromeOS.""" | 260 """Gracefully exit chrome on ChromeOS.""" |
| 261 | 261 |
| 262 def _GetListOfChromePids(): | 262 def _GetListOfChromePids(): |
| 263 """Retrieves the list of currently-running Chrome process IDs. | 263 """Retrieves the list of currently-running Chrome process IDs. |
| 264 | 264 |
| (...skipping 4878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5143 successful = result.wasSuccessful() | 5143 successful = result.wasSuccessful() |
| 5144 if not successful: | 5144 if not successful: |
| 5145 pyauto_tests_file = os.path.join(self.TestsDir(), self._tests_filename) | 5145 pyauto_tests_file = os.path.join(self.TestsDir(), self._tests_filename) |
| 5146 print >>sys.stderr, 'Tests can be disabled by editing %s. ' \ | 5146 print >>sys.stderr, 'Tests can be disabled by editing %s. ' \ |
| 5147 'Ref: %s' % (pyauto_tests_file, _PYAUTO_DOC_URL) | 5147 'Ref: %s' % (pyauto_tests_file, _PYAUTO_DOC_URL) |
| 5148 sys.exit(not successful) | 5148 sys.exit(not successful) |
| 5149 | 5149 |
| 5150 | 5150 |
| 5151 if __name__ == '__main__': | 5151 if __name__ == '__main__': |
| 5152 Main() | 5152 Main() |
| OLD | NEW |