summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/test/functional/downloads.py8
-rw-r--r--chrome/test/pyautolib/pyauto.py13
2 files changed, 4 insertions, 17 deletions
diff --git a/chrome/test/functional/downloads.py b/chrome/test/functional/downloads.py
index 1af21c8..5ec5484 100644
--- a/chrome/test/functional/downloads.py
+++ b/chrome/test/functional/downloads.py
@@ -200,12 +200,8 @@ class DownloadsTest(pyauto.PyUITest):
self.DownloadAndWaitForStart(file_url)
# Waiting for big file to download might exceed automation timeout.
# Temporarily increase the automation timeout.
-
- # Temp workaround for crbug.com/54131
- # self._CallFunctionWithNewTimeout(4 * 60 * 1000, # 4 min.
- # self.WaitForAllDownloadsToComplete)
- self.WaitForAllDownloadsToComplete(timeout=4*60*1000)
- # -- End workaround
+ self._CallFunctionWithNewTimeout(4 * 60 * 1000, # 4 min.
+ self.WaitForAllDownloadsToComplete)
# Verify that the file was correctly downloaded
self.assertTrue(os.path.exists(downloaded_pkg),
'Downloaded file %s missing.' % downloaded_pkg)
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index 2a48f55..3677851 100644
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -489,22 +489,13 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
}
self._GetResultFromJSONRequest(cmd_dict)
- def WaitForAllDownloadsToComplete(self, timeout=-1):
+ def WaitForAllDownloadsToComplete(self):
"""Wait for all downloads to complete.
- Args:
- timeout: The timeout to use - default is WaitUntil's default timeout.
-
Note: This method does not work for dangerous downloads. Use
WaitForGivenDownloadsToComplete (below) instead.
"""
- # Downloads implementation is largely broken. Try to get around by using
- # WaitUntil instead of using notifications. crbug.com/54131
- # self._GetResultFromJSONRequest(
- # {'command': 'WaitForAllDownloadsToComplete'})
- return self.WaitUntil(
- lambda: len(self.GetDownloadsInfo().DownloadsInProgress()) == 0,
- timeout=timeout)
+ self._GetResultFromJSONRequest({'command': 'WaitForAllDownloadsToComplete'})
def WaitForDownloadToComplete(self, download_path, timeout=-1):
"""Wait for the given downloads to complete.