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

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

Issue 3007014: Fixed typo in pyauto.py (Closed)
Patch Set: Created 10 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
« 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/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2010 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """PyAuto: Python Interface to Chromium's Automation Proxy. 7 """PyAuto: Python Interface to Chromium's Automation Proxy.
8 8
9 PyAuto uses swig to expose Automation Proxy interfaces to Python. 9 PyAuto uses swig to expose Automation Proxy interfaces to Python.
10 For complete documentation on the functionality available, 10 For complete documentation on the functionality available,
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 Raises: 1014 Raises:
1015 JSONInterfaceError on error. 1015 JSONInterfaceError on error.
1016 """ 1016 """
1017 cmd_dict = { # Prepare command for the json interface 1017 cmd_dict = { # Prepare command for the json interface
1018 'command': 'AddSavedPassword', 1018 'command': 'AddSavedPassword',
1019 'password': password_dict 1019 'password': password_dict
1020 } 1020 }
1021 return self._GetResultFromJSONRequest( 1021 return self._GetResultFromJSONRequest(
1022 cmd_dict, windex=window_index)['password_added'] 1022 cmd_dict, windex=window_index)['password_added']
1023 1023
1024 def RemoveSavedPassword(self, password_dict): 1024 def RemoveSavedPassword(self, password_dict, window_index=0):
1025 """Removes the password matching the provided password dictionary. 1025 """Removes the password matching the provided password dictionary.
1026 1026
1027 Args: 1027 Args:
1028 password_dict: A dictionary that represents a password. 1028 password_dict: A dictionary that represents a password.
1029 For an example, see the dictionary in AddSavedPassword. 1029 For an example, see the dictionary in AddSavedPassword.
Nirnimesh 2010/07/27 23:57:05 Add doc about window_index:
1030 """ 1030 """
1031 cmd_dict = { # Prepare command for the json interface 1031 cmd_dict = { # Prepare command for the json interface
1032 'command': 'RemoveSavedPassword', 1032 'command': 'RemoveSavedPassword',
1033 'password': password_dict 1033 'password': password_dict
1034 } 1034 }
1035 self._GetResultFromJSONRequest(cmd_dict, windex=window_index) 1035 self._GetResultFromJSONRequest(cmd_dict, windex=window_index)
1036 1036
1037 def GetSavedPasswords(self): 1037 def GetSavedPasswords(self):
1038 """Return the passwords currently saved. 1038 """Return the passwords currently saved.
1039 1039
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 if self._options.verbose: 1345 if self._options.verbose:
1346 verbosity = 2 1346 verbosity = 2
1347 result = unittest.TextTestRunner(verbosity=verbosity).run(pyauto_suite) 1347 result = unittest.TextTestRunner(verbosity=verbosity).run(pyauto_suite)
1348 del loaded_tests # Need to destroy test cases before the suite 1348 del loaded_tests # Need to destroy test cases before the suite
1349 del pyauto_suite 1349 del pyauto_suite
1350 sys.exit(not result.wasSuccessful()) 1350 sys.exit(not result.wasSuccessful())
1351 1351
1352 1352
1353 if __name__ == '__main__': 1353 if __name__ == '__main__':
1354 Main() 1354 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