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

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

Issue 10168019: Adds an automation hook WaitUntilNavigationCompletes() which blocks until pending navigation comple… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed a possible race condition. Created 8 years, 8 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
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/test/pyautolib/pyauto.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/apptest.py
diff --git a/chrome/test/functional/apptest.py b/chrome/test/functional/apptest.py
index 233e76e22d27b967ad744d845b900ed25b7848fb..1f55f91c5c37f117d54b2e5ef3b254b16cd149b3 100644
--- a/chrome/test/functional/apptest.py
+++ b/chrome/test/functional/apptest.py
@@ -43,6 +43,15 @@ class PyAutoEventsTest(pyauto.PyUITest):
self.GetNextEvent(self.AddDomMutationObserver('remove', 'id("fail")/a'))
self.GetNextEvent(success_id)
+ def testWaitUntilNavigationCompletes(self):
+ """Basic test for WaitUntilNavigationCompletes."""
+ url = self.GetHttpURLForDataPath('apptest', 'dom_mutations.html')
+ js = """window.location.href = "%s";
+ window.domAutomationController.send("done");""" % url
+ self.ExecuteJavascript(js)
+ self.WaitUntilNavigationCompletes()
+ self.WaitForDomNode('id("login")')
+
def _ExpectEvent(self, event_id, expected_event_name):
"""Checks that the next event is expected."""
e = self.GetNextEvent(event_id)
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/test/pyautolib/pyauto.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698