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

Unified Diff: chrome/test/automation/tab_proxy.cc

Issue 174396: Fix another source of flakiness in ErrorPageTest (Closed)
Patch Set: 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
« chrome/browser/errorpage_uitest.cc ('K') | « chrome/test/automation/tab_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/automation/tab_proxy.cc
diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc
index f59f821baa8b79f444028074b10743d37aa34d3d..6a1cb0a4d3cfa565cdbace2e793e9209b4a8c278 100644
--- a/chrome/test/automation/tab_proxy.cc
+++ b/chrome/test/automation/tab_proxy.cc
@@ -160,22 +160,35 @@ bool TabProxy::NeedsAuth() const {
}
AutomationMsg_NavigationResponseValues TabProxy::GoBack() {
+ return GoBackBlockUntilNavigationsComplete(1);
+}
+
+AutomationMsg_NavigationResponseValues
+ TabProxy::GoBackBlockUntilNavigationsComplete(int number_of_navigations) {
if (!is_valid())
return AUTOMATION_MSG_NAVIGATION_ERROR;
AutomationMsg_NavigationResponseValues navigate_response =
AUTOMATION_MSG_NAVIGATION_ERROR;
- sender_->Send(new AutomationMsg_GoBack(0, handle_, &navigate_response));
+ sender_->Send(new AutomationMsg_GoBackBlockUntilNavigationsComplete(
+ 0, handle_, number_of_navigations, &navigate_response));
return navigate_response;
}
AutomationMsg_NavigationResponseValues TabProxy::GoForward() {
+ return GoForwardBlockUntilNavigationsComplete(1);
+}
+
+AutomationMsg_NavigationResponseValues
+ TabProxy::GoForwardBlockUntilNavigationsComplete(
+ int number_of_navigations) {
if (!is_valid())
return AUTOMATION_MSG_NAVIGATION_ERROR;
AutomationMsg_NavigationResponseValues navigate_response =
AUTOMATION_MSG_NAVIGATION_ERROR;
- sender_->Send(new AutomationMsg_GoForward(0, handle_, &navigate_response));
+ sender_->Send(new AutomationMsg_GoForwardBlockUntilNavigationsComplete(
+ 0, handle_, number_of_navigations, &navigate_response));
return navigate_response;
}
« chrome/browser/errorpage_uitest.cc ('K') | « chrome/test/automation/tab_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698