summaryrefslogtreecommitdiffstats
path: root/chrome
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
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')
-rw-r--r--chrome/browser/automation/automation_provider.cc49
-rw-r--r--chrome/browser/automation/automation_provider.h16
-rw-r--r--chrome/browser/errorpage_uitest.cc5
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc12
-rw-r--r--chrome/test/automated_ui_tests/automated_ui_test_base.cc1
-rw-r--r--chrome/test/automated_ui_tests/automated_ui_tests.cc3
-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
-rw-r--r--chrome/test/memory_test/memory_test.cc2
-rw-r--r--chrome/test/reliability/page_load_test.cc2
-rw-r--r--chrome/test/ui/ui_test.cc8
-rw-r--r--chrome/test/ui/ui_test.h7
14 files changed, 52 insertions, 112 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 855b678..1784eeac 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -226,14 +226,11 @@ class NavigationNotificationObserver : public NotificationObserver {
public:
NavigationNotificationObserver(NavigationController* controller,
AutomationProvider* automation,
- IPC::Message* reply_message,
- int number_of_navigations)
+ IPC::Message* reply_message)
: automation_(automation),
reply_message_(reply_message),
controller_(controller),
- navigations_remaining_(number_of_navigations),
navigation_started_(false) {
- DCHECK_LT(0, navigations_remaining_);
Source<NavigationController> source(controller_);
registrar_.Add(this, NotificationType::NAV_ENTRY_COMMITTED, source);
registrar_.Add(this, NotificationType::LOAD_START, source);
@@ -283,8 +280,7 @@ class NavigationNotificationObserver : public NotificationObserver {
} else if (type == NotificationType::LOAD_STOP) {
if (navigation_started_) {
navigation_started_ = false;
- if (--navigations_remaining_ == 0)
- ConditionMet(AUTOMATION_MSG_NAVIGATION_SUCCESS);
+ ConditionMet(AUTOMATION_MSG_NAVIGATION_SUCCESS);
}
} else if (type == NotificationType::AUTH_SUPPLIED) {
// The LoginHandler for this tab is no longer valid.
@@ -321,7 +317,6 @@ class NavigationNotificationObserver : public NotificationObserver {
AutomationProvider* automation_;
IPC::Message* reply_message_;
NavigationController* controller_;
- int navigations_remaining_;
bool navigation_started_;
};
@@ -377,7 +372,7 @@ class TabAppendedNotificationObserver : public TabStripNotificationObserver {
return;
}
- automation_->AddNavigationStatusListener(controller, reply_message_, 1);
+ automation_->AddNavigationStatusListener(controller, reply_message_);
}
protected:
@@ -551,7 +546,7 @@ class ExecuteBrowserCommandObserver : public NotificationObserver {
case IDC_RELOAD: {
automation->AddNavigationStatusListener(
&browser->GetSelectedTabContents()->controller(),
- reply_message, 1);
+ reply_message);
break;
}
default: {
@@ -839,11 +834,9 @@ void AutomationProvider::SetExpectedTabCount(size_t expected_tabs) {
}
NotificationObserver* AutomationProvider::AddNavigationStatusListener(
- NavigationController* tab, IPC::Message* reply_message,
- int number_of_navigations) {
+ NavigationController* tab, IPC::Message* reply_message) {
NotificationObserver* observer =
- new NavigationNotificationObserver(tab, this, reply_message,
- number_of_navigations);
+ new NavigationNotificationObserver(tab, this, reply_message);
notification_observer_list_.AddObserver(observer);
return observer;
@@ -926,9 +919,6 @@ void AutomationProvider::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(AutomationMsg_GetCookies, GetCookies)
IPC_MESSAGE_HANDLER(AutomationMsg_SetCookie, SetCookie)
IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_NavigateToURL, NavigateToURL)
- IPC_MESSAGE_HANDLER_DELAY_REPLY(
- AutomationMsg_NavigateToURLBlockUntilNavigationsComplete,
- NavigateToURLBlockUntilNavigationsComplete)
IPC_MESSAGE_HANDLER(AutomationMsg_NavigationAsync, NavigationAsync)
IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_GoBack, GoBack)
IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_GoForward, GoForward)
@@ -1125,12 +1115,6 @@ void AutomationProvider::AppendTab(int handle, const GURL& url,
void AutomationProvider::NavigateToURL(int handle, const GURL& url,
IPC::Message* reply_message) {
- NavigateToURLBlockUntilNavigationsComplete(handle, url, 1, reply_message);
-}
-
-void AutomationProvider::NavigateToURLBlockUntilNavigationsComplete(
- int handle, const GURL& url, int number_of_navigations,
- IPC::Message* reply_message) {
if (tab_tracker_->ContainsHandle(handle)) {
NavigationController* tab = tab_tracker_->GetResource(handle);
@@ -1139,7 +1123,7 @@ void AutomationProvider::NavigateToURLBlockUntilNavigationsComplete(
Browser* browser = FindAndActivateTab(tab);
if (browser) {
- AddNavigationStatusListener(tab, reply_message, number_of_navigations);
+ AddNavigationStatusListener(tab, reply_message);
// TODO(darin): avoid conversion to GURL
browser->OpenURL(url, GURL(), CURRENT_TAB, PageTransition::TYPED);
@@ -1151,6 +1135,7 @@ void AutomationProvider::NavigateToURLBlockUntilNavigationsComplete(
reply_message, AUTOMATION_MSG_NAVIGATION_ERROR);
Send(reply_message);
}
+
void AutomationProvider::NavigationAsync(int handle, const GURL& url,
bool* status) {
*status = false;
@@ -1176,7 +1161,7 @@ void AutomationProvider::GoBack(int handle, IPC::Message* reply_message) {
NavigationController* tab = tab_tracker_->GetResource(handle);
Browser* browser = FindAndActivateTab(tab);
if (browser && browser->command_updater()->IsCommandEnabled(IDC_BACK)) {
- AddNavigationStatusListener(tab, reply_message, 1);
+ AddNavigationStatusListener(tab, reply_message);
browser->GoBack(CURRENT_TAB);
return;
}
@@ -1192,7 +1177,7 @@ void AutomationProvider::GoForward(int handle, IPC::Message* reply_message) {
NavigationController* tab = tab_tracker_->GetResource(handle);
Browser* browser = FindAndActivateTab(tab);
if (browser && browser->command_updater()->IsCommandEnabled(IDC_FORWARD)) {
- AddNavigationStatusListener(tab, reply_message, 1);
+ AddNavigationStatusListener(tab, reply_message);
browser->GoForward(CURRENT_TAB);
return;
}
@@ -1208,7 +1193,7 @@ void AutomationProvider::Reload(int handle, IPC::Message* reply_message) {
NavigationController* tab = tab_tracker_->GetResource(handle);
Browser* browser = FindAndActivateTab(tab);
if (browser && browser->command_updater()->IsCommandEnabled(IDC_RELOAD)) {
- AddNavigationStatusListener(tab, reply_message, 1);
+ AddNavigationStatusListener(tab, reply_message);
browser->Reload();
return;
}
@@ -1232,7 +1217,7 @@ void AutomationProvider::SetAuth(int tab_handle,
// not strictly correct, because a navigation can require both proxy and
// server auth, but it should be OK for now.
LoginHandler* handler = iter->second;
- AddNavigationStatusListener(tab, reply_message, 1);
+ AddNavigationStatusListener(tab, reply_message);
handler->SetAuth(username, password);
return;
}
@@ -1252,7 +1237,7 @@ void AutomationProvider::CancelAuth(int tab_handle,
if (iter != login_handler_map_.end()) {
// If auth is needed again after this, something is screwy.
LoginHandler* handler = iter->second;
- AddNavigationStatusListener(tab, reply_message, 1);
+ AddNavigationStatusListener(tab, reply_message);
handler->CancelAuth();
return;
}
@@ -2289,7 +2274,7 @@ void AutomationProvider::ShowInterstitialPage(int tab_handle,
NavigationController* controller = tab_tracker_->GetResource(tab_handle);
TabContents* tab_contents = controller->tab_contents();
- AddNavigationStatusListener(controller, reply_message, 1);
+ AddNavigationStatusListener(controller, reply_message);
AutomationInterstitialPage* interstitial =
new AutomationInterstitialPage(tab_contents,
GURL("about:interstitial"),
@@ -2487,7 +2472,7 @@ void AutomationProvider::ActionOnSSLBlockingPage(int handle, bool proceed,
InterstitialPage::GetInterstitialPage(tab_contents);
if (ssl_blocking_page) {
if (proceed) {
- AddNavigationStatusListener(tab, reply_message, 1);
+ AddNavigationStatusListener(tab, reply_message);
ssl_blocking_page->Proceed();
return;
}
@@ -2792,7 +2777,7 @@ void AutomationProvider::ClickSSLInfoBarLink(int handle,
int count = nav_controller->tab_contents()->infobar_delegate_count();
if (info_bar_index >= 0 && info_bar_index < count) {
if (wait_for_navigation) {
- AddNavigationStatusListener(nav_controller, reply_message, 1);
+ AddNavigationStatusListener(nav_controller, reply_message);
}
InfoBarDelegate* delegate =
nav_controller->tab_contents()->GetInfoBarDelegateAt(
@@ -2829,7 +2814,7 @@ void AutomationProvider::WaitForNavigation(int handle,
return;
}
- AddNavigationStatusListener(controller, reply_message, 1);
+ AddNavigationStatusListener(controller, reply_message);
}
void AutomationProvider::SetIntPreference(int handle,
diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h
index da47f06..0997653 100644
--- a/chrome/browser/automation/automation_provider.h
+++ b/chrome/browser/automation/automation_provider.h
@@ -69,15 +69,14 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>,
void SetExpectedTabCount(size_t expected_tabs);
// Add a listener for navigation status notification. Currently only
- // navigation completion is observed; when the |number_of_navigations|
- // complete, the completed_response object is sent; if the server requires
- // authentication, we instead send the auth_needed_response object. A pointer
- // to the added navigation observer is returned. This object should NOT be
- // deleted and should be released by calling the corresponding
+ // navigation completion is observed; when the navigation completes, the
+ // completed_response object is sent; if the server requires authentication,
+ // we instead send the auth_needed_response object. A pointer to the added
+ // navigation observer is returned. This object should NOT be deleted and
+ // should be released by calling the corresponding
// RemoveNavigationStatusListener method.
NotificationObserver* AddNavigationStatusListener(
- NavigationController* tab, IPC::Message* reply_message,
- int number_of_navigations);
+ NavigationController* tab, IPC::Message* reply_message);
void RemoveNavigationStatusListener(NotificationObserver* obs);
@@ -199,9 +198,6 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>,
void GetTabURL(int handle, bool* success, GURL* url);
void HandleUnused(const IPC::Message& message, int handle);
void NavigateToURL(int handle, const GURL& url, IPC::Message* reply_message);
- void NavigateToURLBlockUntilNavigationsComplete(int handle, const GURL& url,
- int number_of_navigations,
- IPC::Message* reply_message);
void NavigationAsync(int handle, const GURL& url, bool* status);
void GoBack(int handle, IPC::Message* reply_message);
void GoForward(int handle, IPC::Message* reply_message);
diff --git a/chrome/browser/errorpage_uitest.cc b/chrome/browser/errorpage_uitest.cc
index 8a4c3a0..fda144d 100644
--- a/chrome/browser/errorpage_uitest.cc
+++ b/chrome/browser/errorpage_uitest.cc
@@ -30,10 +30,11 @@ class ErrorPageTest : public UITest {
}
};
-TEST_F(ErrorPageTest, DNSError_Basic) {
+// Flaky, see http://crbug.com/19361 and http://crbug.com/19395.
+TEST_F(ErrorPageTest, DISABLED_DNSError_Basic) {
GURL test_url(URLRequestFailedDnsJob::kTestUrl);
- NavigateToURLBlockUntilNavigationsComplete(test_url, 2);
+ NavigateToURL(test_url);
EXPECT_TRUE(WaitForTitleContaining(test_url.host()));
}
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc b/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc
index 5d0f07c..d8654fd 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc
@@ -148,7 +148,11 @@ TEST_F(ResourceDispatcherTest, SyncXMLHttpRequest_DuringUnload) {
// Navigate to a new page, to dispatch unload event and trigger xhr.
// (the bug would make this step hang the renderer).
- tab->NavigateToURL(server->TestServerPageW(L"files/title2.html"));
+ bool timed_out = false;
+ tab->NavigateToURLWithTimeout(server->TestServerPageW(L"files/title2.html"),
+ action_max_timeout_ms(),
+ &timed_out);
+ EXPECT_FALSE(timed_out);
// Check that the new page got loaded, and that no download was triggered.
EXPECT_TRUE(tab->GetTabTitle(&tab_title));
@@ -244,7 +248,11 @@ TEST_F(ResourceDispatcherTest, CrossSiteNavigationNonBuffered) {
// Make sure that the page loads and displays a title, and doesn't get stuck.
FilePath test_file(test_data_directory_);
test_file = test_file.AppendASCII("title2.html");
- tab->NavigateToURL(net::FilePathToFileURL(test_file));
+ bool timed_out = false;
+ tab->NavigateToURLWithTimeout(net::FilePathToFileURL(test_file),
+ action_max_timeout_ms(),
+ &timed_out);
+ EXPECT_FALSE(timed_out);
EXPECT_EQ(L"Title Of Awesomeness", GetActiveTabTitle());
}
diff --git a/chrome/test/automated_ui_tests/automated_ui_test_base.cc b/chrome/test/automated_ui_tests/automated_ui_test_base.cc
index bf39831..981965d 100644
--- a/chrome/test/automated_ui_tests/automated_ui_test_base.cc
+++ b/chrome/test/automated_ui_tests/automated_ui_test_base.cc
@@ -292,7 +292,6 @@ bool AutomatedUITestBase::Navigate(const GURL& url) {
}
bool did_timeout = false;
tab->NavigateToURLWithTimeout(url,
- 1,
command_execution_timeout_ms(),
&did_timeout);
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc
index 4b94cbf..a2b6611 100644
--- a/chrome/test/automated_ui_tests/automated_ui_tests.cc
+++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc
@@ -623,8 +623,7 @@ bool AutomatedUITest::ForceCrash() {
scoped_refptr<TabProxy> tab(GetActiveTab());
GURL test_url("about:crash");
bool did_timeout;
- tab->NavigateToURLWithTimeout(test_url, 1, kDebuggingTimeoutMsec,
- &did_timeout);
+ tab->NavigateToURLWithTimeout(test_url, kDebuggingTimeoutMsec, &did_timeout);
if (!did_timeout) {
AddInfoAttribute("expected_crash");
return false;
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
diff --git a/chrome/test/memory_test/memory_test.cc b/chrome/test/memory_test/memory_test.cc
index 2bd8d1b..47ac960 100644
--- a/chrome/test/memory_test/memory_test.cc
+++ b/chrome/test/memory_test/memory_test.cc
@@ -249,7 +249,7 @@ class MemoryTest : public UITest {
const int kMaxWaitTime = 5000;
bool timed_out = false;
- tab->NavigateToURLWithTimeout(GURL(urls[counter]), 1, kMaxWaitTime,
+ tab->NavigateToURLWithTimeout(GURL(urls[counter]), kMaxWaitTime,
&timed_out);
if (timed_out)
printf("warning: %s timed out!\n", urls[counter].c_str());
diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc
index 9d158ab5..b3fbeb6 100644
--- a/chrome/test/reliability/page_load_test.cc
+++ b/chrome/test/reliability/page_load_test.cc
@@ -193,7 +193,7 @@ class PageLoadTest : public UITest {
// TabProxy should be released before Browser is closed.
scoped_refptr<TabProxy> tab_proxy(GetActiveTab());
if (tab_proxy.get()) {
- result = tab_proxy->NavigateToURLWithTimeout(url, 1, g_timeout_ms,
+ result = tab_proxy->NavigateToURLWithTimeout(url, g_timeout_ms,
&is_timeout);
}
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index 97d22fa..ec08b65 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -576,11 +576,6 @@ 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())
@@ -588,8 +583,7 @@ void UITest::NavigateToURLBlockUntilNavigationsComplete(
bool is_timeout = true;
ASSERT_TRUE(tab_proxy->NavigateToURLWithTimeout(
- url, number_of_navigations, command_execution_timeout_ms(),
- &is_timeout)) << url.spec();
+ url, command_execution_timeout_ms(), &is_timeout)) << url.spec();
ASSERT_FALSE(is_timeout) << url.spec();
}
diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h
index 8568822..50afc27 100644
--- a/chrome/test/ui/ui_test.h
+++ b/chrome/test/ui/ui_test.h
@@ -89,13 +89,6 @@ class UITest : public testing::Test {
// This method doesn't return until the navigation is complete.
void NavigateToURL(const GURL& url);
- // Tells the browser to navigate to the given URL in the active tab
- // of the first app window.
- // This method doesn't return until the |number_of_navigations| navigations
- // complete.
- void NavigateToURLBlockUntilNavigationsComplete(const GURL& url,
- int number_of_navigations);
-
// Returns the URL of the currently active tab. Only looks in the first
// window, for backward compatibility. If there is no active tab, or some
// other error, the returned URL will be empty.