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

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

Issue 7544026: Fix for flakiness in pyauto automation hook WaitForDownloadsToComplete. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-wrote the first patch set. 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
Index: chrome/test/functional/prefs.py
diff --git a/chrome/test/functional/prefs.py b/chrome/test/functional/prefs.py
index 6ac9dce58cd0433f5355de0b7eb2657c5cfac395..79a2112bca06759d7238926df5bd243c7d73b083 100644
--- a/chrome/test/functional/prefs.py
+++ b/chrome/test/functional/prefs.py
@@ -101,8 +101,9 @@ class PrefsTest(pyauto.PyUITest):
os.makedirs(new_dl_dir)
# Set pref to download in new_dl_dir
self.SetPrefs(pyauto.kDownloadDefaultDirectory, new_dl_dir)
+ pre_download_ids = [x['id'] for x in self.GetDownloadsInfo().Downloads()]
self.DownloadAndWaitForStart(file_url)
- self.WaitForAllDownloadsToComplete()
+ self.WaitForAllDownloadsToComplete(pre_download_ids)
self.assertTrue(os.path.exists(downloaded_pkg))
shutil.rmtree(new_dl_dir, ignore_errors=True) # cleanup

Powered by Google App Engine
This is Rietveld 408576698