summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-19 18:00:55 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-19 18:00:55 +0000
commitd53a76b8bc94f47de9e22d345d849d6c5e5117ea (patch)
treed05fbb167ca14b7dd36060cb6d2ceb123581728b /chrome/test/automation
parent38355fcc73d873e8e8e56b4d8c46f0d703a36543 (diff)
downloadchromium_src-d53a76b8bc94f47de9e22d345d849d6c5e5117ea.zip
chromium_src-d53a76b8bc94f47de9e22d345d849d6c5e5117ea.tar.gz
chromium_src-d53a76b8bc94f47de9e22d345d849d6c5e5117ea.tar.bz2
Revert "Add automation call to wait for multiple navigations."
Broke the page cyclers. TBR=tony Review URL: http://codereview.chromium.org/174065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23717 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation')
-rw-r--r--chrome/test/automation/automation_messages_internal.h15
-rw-r--r--chrome/test/automation/automation_proxy_uitest.cc8
-rw-r--r--chrome/test/automation/tab_proxy.cc18
-rw-r--r--chrome/test/automation/tab_proxy.h18
4 files changed, 12 insertions, 47 deletions
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h
index ba00e04..5ebaca0 100644
--- a/chrome/test/automation/automation_messages_internal.h
+++ b/chrome/test/automation/automation_messages_internal.h
@@ -82,11 +82,6 @@ IPC_BEGIN_MESSAGES(Automation)
// the tab resource. The second parameter is the target url. The return
// value contains a status code which is nonnegative on success.
// See AutomationMsg_NavigationResponseValues for the return value.
- //
- // This is deprecated in favor of
- // AutomationMsg_NavigateToURLBlockUntilNavigationsComplete.
- //
- // TODO(phajdan.jr): Remove when the reference build gets updated.
IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_NavigateToURL, int, GURL,
AutomationMsg_NavigationResponseValues)
@@ -1013,14 +1008,4 @@ IPC_BEGIN_MESSAGES(Automation)
IPC_MESSAGE_ROUTED3(AutomationMsg_WindowClick, int, gfx::Point, int)
#endif
- // This message notifies the AutomationProvider to navigate to a specified
- // url in the tab with given handle. The first parameter is the handle to
- // the tab resource. The second parameter is the target url. The third
- // parameter is the number of navigations that are required for a successful
- // return value. See AutomationMsg_NavigationResponseValues for the return
- // value.
- IPC_SYNC_MESSAGE_ROUTED3_1(
- AutomationMsg_NavigateToURLBlockUntilNavigationsComplete, int, GURL, int,
- AutomationMsg_NavigationResponseValues)
-
IPC_END_MESSAGES(Automation)
diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc
index a709629..c67c1f7 100644
--- a/chrome/test/automation/automation_proxy_uitest.cc
+++ b/chrome/test/automation/automation_proxy_uitest.cc
@@ -282,7 +282,7 @@ TEST_F(AutomationProxyTest, NavigateToURLWithTimeout1) {
bool is_timeout;
tab->NavigateToURLWithTimeout(net::FilePathToFileURL(filename),
- 1, 5000, &is_timeout);
+ 5000, &is_timeout);
ASSERT_FALSE(is_timeout);
std::wstring title;
@@ -294,7 +294,7 @@ TEST_F(AutomationProxyTest, NavigateToURLWithTimeout1) {
ASSERT_GE(URLRequestSlowHTTPJob::kDelayMs, kLowTimeoutMs);
tab->NavigateToURLWithTimeout(
URLRequestSlowHTTPJob::GetMockUrl(filename.ToWStringHack()),
- 1, kLowTimeoutMs, &is_timeout);
+ kLowTimeoutMs, &is_timeout);
ASSERT_TRUE(is_timeout);
}
@@ -314,13 +314,13 @@ TEST_F(AutomationProxyTest, NavigateToURLWithTimeout2) {
ASSERT_GE(URLRequestSlowHTTPJob::kDelayMs, kLowTimeoutMs);
tab->NavigateToURLWithTimeout(
URLRequestSlowHTTPJob::GetMockUrl(filename1.ToWStringHack()),
- 1, kLowTimeoutMs, &is_timeout);
+ kLowTimeoutMs, &is_timeout);
ASSERT_TRUE(is_timeout);
FilePath filename2(test_data_directory_);
filename2 = filename2.AppendASCII("title1.html");
tab->NavigateToURLWithTimeout(net::FilePathToFileURL(filename2),
- 1, 5000, &is_timeout);
+ 5000, &is_timeout);
ASSERT_FALSE(is_timeout);
}
diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc
index 712a98c..6ee36a2 100644
--- a/chrome/test/automation/tab_proxy.cc
+++ b/chrome/test/automation/tab_proxy.cc
@@ -71,29 +71,19 @@ int TabProxy::FindInPage(const std::wstring& search_string,
AutomationMsg_NavigationResponseValues TabProxy::NavigateToURL(
const GURL& url) {
- return NavigateToURLBlockUntilNavigationsComplete(url, 1);
-}
-
-AutomationMsg_NavigationResponseValues
- TabProxy::NavigateToURLBlockUntilNavigationsComplete(
- const GURL& url, int number_of_navigations) {
- return NavigateToURLWithTimeout(url, number_of_navigations, base::kNoTimeout,
- NULL);
+ return NavigateToURLWithTimeout(url, base::kNoTimeout, NULL);
}
AutomationMsg_NavigationResponseValues TabProxy::NavigateToURLWithTimeout(
- const GURL& url, int number_of_navigations, uint32 timeout_ms,
- bool* is_timeout) {
+ const GURL& url, uint32 timeout_ms, bool* is_timeout) {
if (!is_valid())
return AUTOMATION_MSG_NAVIGATION_ERROR;
AutomationMsg_NavigationResponseValues navigate_response =
AUTOMATION_MSG_NAVIGATION_ERROR;
- sender_->SendWithTimeout(
- new AutomationMsg_NavigateToURLBlockUntilNavigationsComplete(
- 0, handle_, url, number_of_navigations, &navigate_response),
- timeout_ms, is_timeout);
+ sender_->SendWithTimeout(new AutomationMsg_NavigateToURL(
+ 0, handle_, url, &navigate_response), timeout_ms, is_timeout);
return navigate_response;
}
diff --git a/chrome/test/automation/tab_proxy.h b/chrome/test/automation/tab_proxy.h
index 2c19bea..5e83227 100644
--- a/chrome/test/automation/tab_proxy.h
+++ b/chrome/test/automation/tab_proxy.h
@@ -77,23 +77,13 @@ class TabProxy : public AutomationResourceProxy {
// Navigates to a url. This method accepts the same kinds of URL input that
// can be passed to Chrome on the command line. This is a synchronous call and
// hence blocks until the navigation completes.
- AutomationMsg_NavigationResponseValues NavigateToURL(
- const GURL& url);
-
- // Navigates to a url. This method accepts the same kinds of URL input that
- // can be passed to Chrome on the command line. This is a synchronous call and
- // hence blocks until the |number_of_navigations| navigations complete.
- AutomationMsg_NavigationResponseValues
- NavigateToURLBlockUntilNavigationsComplete(const GURL& url,
- int number_of_navigations);
+ AutomationMsg_NavigationResponseValues NavigateToURL(const GURL& url);
// Navigates to a url. This is same as NavigateToURL with a timeout option.
- // The function blocks until the |number_of_navigations| navigations
- // completes or timeout (in milliseconds) occurs. If return after timeout,
- // is_timeout is set to true.
+ // The function returns until the navigation completes or timeout (in
+ // milliseconds) occurs. If return after timeout, is_timeout is set to true.
AutomationMsg_NavigationResponseValues NavigateToURLWithTimeout(
- const GURL& url, int number_of_navigations, uint32 timeout_ms,
- bool* is_timeout);
+ const GURL& url, uint32 timeout_ms, bool* is_timeout);
// Navigates to a url in an externally hosted tab.
// This method accepts the same kinds of URL input that