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

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

Issue 11711003: Remove the DownloadItem::TogglePause() interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to r175145. Created 7 years, 11 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/downloads.py ('k') | content/browser/download/download_item_impl.h » ('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) 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 2353 matching lines...) Expand 10 before | Expand all | Expand 10 after
2364 action: The action to perform on the download. 2364 action: The action to perform on the download.
2365 Possible actions: 2365 Possible actions:
2366 'open': Opens the download (waits until it has completed first). 2366 'open': Opens the download (waits until it has completed first).
2367 'toggle_open_files_like_this': Toggles the 'Always Open Files 2367 'toggle_open_files_like_this': Toggles the 'Always Open Files
2368 Of This Type' option. 2368 Of This Type' option.
2369 'remove': Removes the file from downloads (not from disk). 2369 'remove': Removes the file from downloads (not from disk).
2370 'decline_dangerous_download': Equivalent to 'Discard' option 2370 'decline_dangerous_download': Equivalent to 'Discard' option
2371 after downloading a dangerous download (ex. an executable). 2371 after downloading a dangerous download (ex. an executable).
2372 'save_dangerous_download': Equivalent to 'Save' option after 2372 'save_dangerous_download': Equivalent to 'Save' option after
2373 downloading a dangerous file. 2373 downloading a dangerous file.
2374 'toggle_pause': Toggles the paused state of the download. If the 2374 'pause': Pause the download. If the download completed before
2375 download completed before this call, it's a no-op. 2375 this call or is already paused, it's a no-op.
2376 'resume': Resume the download. If the download completed before
2377 this call or was not paused, it's a no-op.
2376 'cancel': Cancel the download. 2378 'cancel': Cancel the download.
2377 window_index: The window index, default is 0. 2379 window_index: The window index, default is 0.
2378 2380
2379 Returns: 2381 Returns:
2380 A dictionary representing the updated download item (except in the case 2382 A dictionary representing the updated download item (except in the case
2381 of 'decline_dangerous_download', 'toggle_open_files_like_this', and 2383 of 'decline_dangerous_download', 'toggle_open_files_like_this', and
2382 'remove', which return an empty dict). 2384 'remove', which return an empty dict).
2383 Example dictionary: 2385 Example dictionary:
2384 { u'PercentComplete': 100, 2386 { u'PercentComplete': 100,
2385 u'file_name': u'file.txt', 2387 u'file_name': u'file.txt',
(...skipping 4102 matching lines...) Expand 10 before | Expand all | Expand 10 after
6488 successful = result.wasSuccessful() 6490 successful = result.wasSuccessful()
6489 if not successful: 6491 if not successful:
6490 pyauto_tests_file = os.path.join(self.TestsDir(), self._tests_filename) 6492 pyauto_tests_file = os.path.join(self.TestsDir(), self._tests_filename)
6491 print >>sys.stderr, 'Tests can be disabled by editing %s. ' \ 6493 print >>sys.stderr, 'Tests can be disabled by editing %s. ' \
6492 'Ref: %s' % (pyauto_tests_file, _PYAUTO_DOC_URL) 6494 'Ref: %s' % (pyauto_tests_file, _PYAUTO_DOC_URL)
6493 sys.exit(not successful) 6495 sys.exit(not successful)
6494 6496
6495 6497
6496 if __name__ == '__main__': 6498 if __name__ == '__main__':
6497 Main() 6499 Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/downloads.py ('k') | content/browser/download/download_item_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698