summaryrefslogtreecommitdiffstats
path: root/chrome/test/pyautolib/pyauto.py
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/pyautolib/pyauto.py')
-rw-r--r--chrome/test/pyautolib/pyauto.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index 4d45d65..fe5f9ab 100644
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -69,6 +69,7 @@ except ImportError:
raise
# Should go after sys.path is set appropriately
+import simplejson as json # found in third_party
import bookmark_model
@@ -143,6 +144,13 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
"""
return bookmark_model.BookmarkModel(self._GetBookmarksAsJSON())
+ def WaitForAllDownloadsToComplete(self):
+ """Wait for all downloads to complete."""
+ # Implementation detail: uses the generic "JSON command" model
+ # (experimental)
+ self._SendJSONRequest(0, json.dumps({'command':
+ 'WaitForAllDownloadsToComplete'}))
+
class PyUITestSuite(pyautolib.PyUITestSuiteBase, unittest.TestSuite):
"""Base TestSuite for PyAuto UI tests."""
@@ -310,4 +318,3 @@ class Main(object):
if __name__ == '__main__':
Main()
-