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

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

Issue 6877001: Fix build break in pyautolib with gcc >= 4.5. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 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 | chrome/test/pyautolib/pyautolib.cc » ('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/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2011 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 if ret_dict.has_key('error'): 527 if ret_dict.has_key('error'):
528 raise JSONInterfaceError(ret_dict['error']) 528 raise JSONInterfaceError(ret_dict['error'])
529 return ret_dict 529 return ret_dict
530 530
531 def GetBookmarkModel(self): 531 def GetBookmarkModel(self):
532 """Return the bookmark model as a BookmarkModel object. 532 """Return the bookmark model as a BookmarkModel object.
533 533
534 This is a snapshot of the bookmark model; it is not a proxy and 534 This is a snapshot of the bookmark model; it is not a proxy and
535 does not get updated as the bookmark model changes. 535 does not get updated as the bookmark model changes.
536 """ 536 """
537 return bookmark_model.BookmarkModel(self._GetBookmarksAsJSON()) 537 bookmarksAsJSON = self._GetBookmarksAsJSON()
Nirnimesh 2011/05/05 23:02:01 nit: s/bookmarksAsJSON/bookmarks_as_json/
538 if bookmarksAsJSON == None:
539 raise JSONInterfaceError('Could not resolve browser proxy.')
540 return bookmark_model.BookmarkModel(bookmarksAsJSON)
538 541
539 def GetDownloadsInfo(self, windex=0): 542 def GetDownloadsInfo(self, windex=0):
540 """Return info about downloads. 543 """Return info about downloads.
541 544
542 This includes all the downloads recognized by the history system. 545 This includes all the downloads recognized by the history system.
543 546
544 Returns: 547 Returns:
545 an instance of downloads_info.DownloadInfo 548 an instance of downloads_info.DownloadInfo
546 """ 549 """
547 return download_info.DownloadInfo( 550 return download_info.DownloadInfo(
(...skipping 2814 matching lines...) Expand 10 before | Expand all | Expand 10 after
3362 if self._options.verbose: 3365 if self._options.verbose:
3363 verbosity = 2 3366 verbosity = 2
3364 result = PyAutoTextTestRuner(verbosity=verbosity).run(pyauto_suite) 3367 result = PyAutoTextTestRuner(verbosity=verbosity).run(pyauto_suite)
3365 del loaded_tests # Need to destroy test cases before the suite 3368 del loaded_tests # Need to destroy test cases before the suite
3366 del pyauto_suite 3369 del pyauto_suite
3367 sys.exit(not result.wasSuccessful()) 3370 sys.exit(not result.wasSuccessful())
3368 3371
3369 3372
3370 if __name__ == '__main__': 3373 if __name__ == '__main__':
3371 Main() 3374 Main()
OLDNEW
« no previous file with comments | « no previous file | chrome/test/pyautolib/pyautolib.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698