Index: chrome/test/pyautolib/download_info.py |
diff --git a/chrome/test/pyautolib/download_info.py b/chrome/test/pyautolib/download_info.py |
index e01fdac69002cfe1cb227f718875d63c8a796420..5f621a2be6721b7217bf8c8291d9c5ce1a002c2c 100644 |
--- a/chrome/test/pyautolib/download_info.py |
+++ b/chrome/test/pyautolib/download_info.py |
@@ -10,8 +10,9 @@ Obtain one of these from PyUITestSuite::GetDownloadsInfo() call. |
class MyDownloadsTest(pyauto.PyUITest): |
def testDownload(self): |
- self.NavigateToURL('http://my.url/package.zip') |
- self.WaitForDownloadsToComplete() |
+ pre_download_ids = [x['id'] for x in self.GetDownloadsInfo().Downloads()] |
+ self.DownloadAndWaitForStart('http://my.url/package.zip') |
+ self.WaitForAllDownloadsToComplete(pre_download_ids) |
info = self.GetDownloadsInfo() |
print info.Downloads() |
self.assertEqual(info.Downloads()[0]['file_name'], 'packge.zip') |