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

Side by Side Diff: chrome/test/pyautolib/pyauto.py

Issue 10828335: [pyauto] Fix ActionTimeoutChanger (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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/test_pyauto.py ('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 """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 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 1052
1053 timeout: request timeout (in milliseconds) 1053 timeout: request timeout (in milliseconds)
1054 1054
1055 Returns: 1055 Returns:
1056 a dictionary for the output returned by the automation channel. 1056 a dictionary for the output returned by the automation channel.
1057 1057
1058 Raises: 1058 Raises:
1059 pyauto_errors.JSONInterfaceError if the automation call returns an error. 1059 pyauto_errors.JSONInterfaceError if the automation call returns an error.
1060 """ 1060 """
1061 if timeout == -1: # Default 1061 if timeout == -1: # Default
1062 timeout = self.action_max_timeout_ms() 1062 timeout = self.action_timeout_ms()
1063 if windex is None: # Do not target any window 1063 if windex is None: # Do not target any window
1064 windex = -1 1064 windex = -1
1065 result = self._SendJSONRequest(windex, json.dumps(cmd_dict), timeout) 1065 result = self._SendJSONRequest(windex, json.dumps(cmd_dict), timeout)
1066 if not result: 1066 if not result:
1067 additional_info = 'No information available.' 1067 additional_info = 'No information available.'
1068 # Windows does not support os.kill until Python 2.7. 1068 # Windows does not support os.kill until Python 2.7.
1069 if not self.IsWin() and _BROWSER_PID: 1069 if not self.IsWin() and _BROWSER_PID:
1070 browser_pid_exists = True 1070 browser_pid_exists = True
1071 # Does the browser PID exist? 1071 # Does the browser PID exist?
1072 try: 1072 try:
(...skipping 5905 matching lines...) Expand 10 before | Expand all | Expand 10 after
6978 successful = result.wasSuccessful() 6978 successful = result.wasSuccessful()
6979 if not successful: 6979 if not successful:
6980 pyauto_tests_file = os.path.join(self.TestsDir(), self._tests_filename) 6980 pyauto_tests_file = os.path.join(self.TestsDir(), self._tests_filename)
6981 print >>sys.stderr, 'Tests can be disabled by editing %s. ' \ 6981 print >>sys.stderr, 'Tests can be disabled by editing %s. ' \
6982 'Ref: %s' % (pyauto_tests_file, _PYAUTO_DOC_URL) 6982 'Ref: %s' % (pyauto_tests_file, _PYAUTO_DOC_URL)
6983 sys.exit(not successful) 6983 sys.exit(not successful)
6984 6984
6985 6985
6986 if __name__ == '__main__': 6986 if __name__ == '__main__':
6987 Main() 6987 Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/test_pyauto.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698