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

Unified Diff: chrome/test/functional/infobars.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/infobars.py
diff --git a/chrome/test/functional/infobars.py b/chrome/test/functional/infobars.py
index 5019e75d744db1ef824247112dd3ffa8fb3e45e8..5b0688e4b34d3aaaa666b2d6acbc5b1728e919d2 100644
--- a/chrome/test/functional/infobars.py
+++ b/chrome/test/functional/infobars.py
@@ -129,6 +129,7 @@ class InfobarTest(pyauto.PyUITest):
'Do you want to allow this?'
self.NavigateToURL('chrome://downloads') # trigger download manager
test_utils.RemoveDownloadedTestFile(self, zip_file)
+ pre_download_ids = [x['id'] for x in self.GetDownloadsInfo().Downloads()]
self.DownloadAndWaitForStart(file_url)
# trigger page reload, which triggers the download infobar
self.GetBrowserWindow(0).GetTab(0).Reload()
@@ -141,7 +142,7 @@ class InfobarTest(pyauto.PyUITest):
self.assertEqual(2, len(infobars[0]['buttons']))
self.assertEqual('Allow', infobars[0]['buttons'][0])
self.assertEqual('Deny', infobars[0]['buttons'][1])
- self.WaitForAllDownloadsToComplete()
+ self.WaitForAllDownloadsToComplete(pre_download_ids)
test_utils.RemoveDownloadedTestFile(self, zip_file)
def testPluginCrashForMultiTabs(self):

Powered by Google App Engine
This is Rietveld 408576698