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

Unified Diff: chrome/test/functional/translate.py

Issue 7544026: Fix for flakiness in pyauto automation hook WaitForDownloadsToComplete. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with trunk; awaiting green trybots. Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/functional/test_utils.py ('k') | chrome/test/pyautolib/download_info.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/translate.py
diff --git a/chrome/test/functional/translate.py b/chrome/test/functional/translate.py
index 4d18ca1823fcb7b38ceb7e3fc0b1d91158c0ae11..fbab00c27c4f3216bc03125a5b18cdbab028bae7 100644
--- a/chrome/test/functional/translate.py
+++ b/chrome/test/functional/translate.py
@@ -432,9 +432,11 @@ class TranslateTest(pyauto.PyUITest):
file_url = self.GetFileURLForPath(file_path)
downloaded_file = os.path.join(download_dir, filename)
os.path.exists(downloaded_file) and os.remove(downloaded_file)
+ pre_download_ids = [x['id']
+ for x in self.GetDownloadsInfo().Downloads()]
self.DownloadAndWaitForStart(file_url)
# Wait for files and remove them as we go.
- self.WaitForAllDownloadsToComplete()
+ self.WaitForAllDownloadsToComplete(pre_download_ids)
os.path.exists(downloaded_file) and os.remove(downloaded_file)
finally:
shutil.rmtree(unicode(temp_dir)) # unicode so that win treats nicely.
« no previous file with comments | « chrome/test/functional/test_utils.py ('k') | chrome/test/pyautolib/download_info.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698