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

Unified Diff: chrome/test/ui/ui_test.cc

Issue 174015: Add automation call to wait for multiple navigations. (Closed)
Patch Set: backwards compatibility, properly done Created 11 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
« no previous file with comments | « chrome/test/ui/ui_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/ui/ui_test.cc
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index ec08b65fb9d4a5ba76d159f09ed1706519a2bb28..97d22fa5f6a20b7662375d83967b444646560fc7 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -576,6 +576,11 @@ void UITest::NavigateToURLAsync(const GURL& url) {
}
void UITest::NavigateToURL(const GURL& url) {
+ NavigateToURLBlockUntilNavigationsComplete(url, 1);
+}
+
+void UITest::NavigateToURLBlockUntilNavigationsComplete(
+ const GURL& url, int number_of_navigations) {
scoped_refptr<TabProxy> tab_proxy(GetActiveTab());
ASSERT_TRUE(tab_proxy.get());
if (!tab_proxy.get())
@@ -583,7 +588,8 @@ void UITest::NavigateToURL(const GURL& url) {
bool is_timeout = true;
ASSERT_TRUE(tab_proxy->NavigateToURLWithTimeout(
- url, command_execution_timeout_ms(), &is_timeout)) << url.spec();
+ url, number_of_navigations, command_execution_timeout_ms(),
+ &is_timeout)) << url.spec();
ASSERT_FALSE(is_timeout) << url.spec();
}
« no previous file with comments | « chrome/test/ui/ui_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698