summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation/tab_proxy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/automation/tab_proxy.cc')
-rw-r--r--chrome/test/automation/tab_proxy.cc35
1 files changed, 13 insertions, 22 deletions
diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc
index dbf4875..0f28409 100644
--- a/chrome/test/automation/tab_proxy.cc
+++ b/chrome/test/automation/tab_proxy.cc
@@ -77,33 +77,22 @@ AutomationMsg_NavigationResponseValues TabProxy::NavigateToURL(
AutomationMsg_NavigationResponseValues
TabProxy::NavigateToURLBlockUntilNavigationsComplete(
const GURL& url, int number_of_navigations) {
- return NavigateToURLWithTimeout(url, number_of_navigations, base::kNoTimeout,
- NULL);
-}
-
-AutomationMsg_NavigationResponseValues TabProxy::NavigateToURLWithTimeout(
- const GURL& url, int number_of_navigations, uint32 timeout_ms,
- bool* is_timeout) {
if (!is_valid())
return AUTOMATION_MSG_NAVIGATION_ERROR;
-
+
AutomationMsg_NavigationResponseValues navigate_response =
AUTOMATION_MSG_NAVIGATION_ERROR;
-
+
if (number_of_navigations == 1) {
// TODO(phajdan.jr): Remove when the reference build gets updated.
// This is only for backwards compatibility.
- sender_->SendWithTimeout(
- new AutomationMsg_NavigateToURL(
- 0, handle_, url, &navigate_response),
- timeout_ms, is_timeout);
+ sender_->Send(new AutomationMsg_NavigateToURL(0, handle_, url,
+ &navigate_response));
} else {
- sender_->SendWithTimeout(
- new AutomationMsg_NavigateToURLBlockUntilNavigationsComplete(
- 0, handle_, url, number_of_navigations, &navigate_response),
- timeout_ms, is_timeout);
+ sender_->Send(new AutomationMsg_NavigateToURLBlockUntilNavigationsComplete(
+ 0, handle_, url, number_of_navigations, &navigate_response));
}
-
+
return navigate_response;
}
@@ -470,15 +459,17 @@ bool TabProxy::GetDownloadDirectory(FilePath* directory) {
directory));
}
-bool TabProxy::ShowInterstitialPage(const std::string& html_text,
- int timeout_ms) {
+bool TabProxy::ShowInterstitialPage(const std::string& html_text) {
if (!is_valid())
return false;
AutomationMsg_NavigationResponseValues result =
AUTOMATION_MSG_NAVIGATION_ERROR;
- sender_->SendWithTimeout(new AutomationMsg_ShowInterstitialPage(
- 0, handle_, html_text, &result), timeout_ms, NULL);
+ if (!sender_->Send(new AutomationMsg_ShowInterstitialPage(
+ 0, handle_, html_text, &result))) {
+ return false;
+ }
+
return result == AUTOMATION_MSG_NAVIGATION_SUCCESS;
}