summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/ui')
-rw-r--r--chrome/test/ui/fast_shutdown_uitest.cc2
-rw-r--r--chrome/test/ui/npapi_uitest.cc6
-rw-r--r--chrome/test/ui/ui_test.cc14
3 files changed, 8 insertions, 14 deletions
diff --git a/chrome/test/ui/fast_shutdown_uitest.cc b/chrome/test/ui/fast_shutdown_uitest.cc
index d7663f8..8b2b554 100644
--- a/chrome/test/ui/fast_shutdown_uitest.cc
+++ b/chrome/test/ui/fast_shutdown_uitest.cc
@@ -41,7 +41,7 @@ TEST_F(FastShutdown, DISABLED_SlowTermination) {
// Close the browser. We should launch the unload handler, which is an
// alert().
ASSERT_TRUE(browser->ApplyAccelerator(IDC_CLOSE_WINDOW));
- ASSERT_TRUE(automation()->WaitForAppModalDialog(action_max_timeout_ms()));
+ ASSERT_TRUE(automation()->WaitForAppModalDialog());
ASSERT_TRUE(automation()->ClickAppModalDialogButton(
MessageBoxFlags::DIALOGBUTTON_OK));
}
diff --git a/chrome/test/ui/npapi_uitest.cc b/chrome/test/ui/npapi_uitest.cc
index 329c204..6d1d8ca 100644
--- a/chrome/test/ui/npapi_uitest.cc
+++ b/chrome/test/ui/npapi_uitest.cc
@@ -128,7 +128,7 @@ TEST_F(NPAPITester, DISABLED_SelfDeletePluginInvokeAlert) {
ASSERT_NO_FATAL_FAILURE(NavigateToURL(url));
// Wait for the alert dialog and then close it.
- ASSERT_TRUE(automation()->WaitForAppModalDialog(5000));
+ ASSERT_TRUE(automation()->WaitForAppModalDialog());
scoped_refptr<WindowProxy> window(automation()->GetActiveWindow());
ASSERT_TRUE(window.get());
ASSERT_TRUE(window->SimulateOSKeyPress(base::VKEY_ESCAPE, 0));
@@ -200,7 +200,7 @@ TEST_F(NPAPIVisiblePluginTester, AlertInWindowMessage) {
bool modal_dialog_showing = false;
MessageBoxFlags::DialogButton available_buttons;
- ASSERT_TRUE(automation()->WaitForAppModalDialog(kShortWaitTimeout));
+ ASSERT_TRUE(automation()->WaitForAppModalDialog());
ASSERT_TRUE(automation()->GetShowingAppModalDialog(&modal_dialog_showing,
&available_buttons));
ASSERT_TRUE(modal_dialog_showing);
@@ -209,7 +209,7 @@ TEST_F(NPAPIVisiblePluginTester, AlertInWindowMessage) {
MessageBoxFlags::DIALOGBUTTON_OK));
modal_dialog_showing = false;
- ASSERT_TRUE(automation()->WaitForAppModalDialog(kShortWaitTimeout));
+ ASSERT_TRUE(automation()->WaitForAppModalDialog());
ASSERT_TRUE(automation()->GetShowingAppModalDialog(&modal_dialog_showing,
&available_buttons));
ASSERT_TRUE(modal_dialog_showing);
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index f4dbfb0..83803ed 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -539,12 +539,9 @@ void UITestBase::NavigateToURLBlockUntilNavigationsComplete(
const GURL& url, int number_of_navigations) {
scoped_refptr<TabProxy> tab_proxy(GetActiveTab());
ASSERT_TRUE(tab_proxy.get());
- bool is_timeout = true;
EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
- tab_proxy->NavigateToURLWithTimeout(
- url, number_of_navigations, action_max_timeout_ms(),
- &is_timeout)) << url.spec();
- ASSERT_FALSE(is_timeout) << url.spec();
+ tab_proxy->NavigateToURLBlockUntilNavigationsComplete(
+ url, number_of_navigations)) << url.spec();
}
void UITestBase::NavigateToURLBlockUntilNavigationsComplete(
@@ -555,12 +552,9 @@ void UITestBase::NavigateToURLBlockUntilNavigationsComplete(
ASSERT_TRUE(window.get());
scoped_refptr<TabProxy> tab_proxy(window->GetTab(tab_index));
ASSERT_TRUE(tab_proxy.get());
- bool is_timeout = true;
EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
- tab_proxy->NavigateToURLWithTimeout(
- url, number_of_navigations, action_max_timeout_ms(),
- &is_timeout)) << url.spec();
- ASSERT_FALSE(is_timeout) << url.spec();
+ tab_proxy->NavigateToURLBlockUntilNavigationsComplete(
+ url, number_of_navigations)) << url.spec();
}
bool UITestBase::WaitForDownloadShelfVisible(BrowserProxy* browser) {