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.cc3
-rw-r--r--chrome/test/ui/history_uitest.cc38
-rw-r--r--chrome/test/ui/mouseleave_uitest.cc17
-rw-r--r--chrome/test/ui/omnibox_uitest.cc4
-rw-r--r--chrome/test/ui/v8_benchmark_uitest.cc1
5 files changed, 35 insertions, 28 deletions
diff --git a/chrome/test/ui/fast_shutdown_uitest.cc b/chrome/test/ui/fast_shutdown_uitest.cc
index 8b2b554..6f4e174 100644
--- a/chrome/test/ui/fast_shutdown_uitest.cc
+++ b/chrome/test/ui/fast_shutdown_uitest.cc
@@ -26,8 +26,7 @@ TEST_F(FastShutdown, DISABLED_SlowTermination) {
ASSERT_TRUE(window.get());
// This page has an unload handler.
- GURL url = GetTestUrl(L"fast_shutdown", L"on_unloader.html");
- NavigateToURLBlockUntilNavigationsComplete(url, 1);
+ NavigateToURL(GetTestUrl(L"fast_shutdown", L"on_unloader.html"));
gfx::Rect bounds;
ASSERT_TRUE(window->GetViewBounds(VIEW_ID_TAB_CONTAINER, &bounds, true));
// This click will launch a popup which has a before unload handler.
diff --git a/chrome/test/ui/history_uitest.cc b/chrome/test/ui/history_uitest.cc
index 522c221..22c1aee 100644
--- a/chrome/test/ui/history_uitest.cc
+++ b/chrome/test/ui/history_uitest.cc
@@ -33,34 +33,36 @@ class HistoryTester : public UITest {
// These tests are flaky because automatic and user-initiated transitions are
// distinguished based on the interval between page load and redirect.
-TEST_F(HistoryTester, DISABLED_VerifyHistoryLength) {
+// Flaky, http://crbug.com/39785.
+TEST_F(HistoryTester, FLAKY_VerifyHistoryLength1) {
// Test the history length for the following page transitions.
- //
- // Test case 1:
// -open-> Page 1.
- // Test case 2:
- // -open-> Page 2 -redirect-> Page 3.
- // Test case 3:
- // -open-> Page 4 -navigate_backward-> Page 3 -navigate_backward->Page 1
- // -navigate_forward-> Page 3 -navigate_forward-> Page 4
- //
- // Note that Page 2 is not visited on navigating backward/forward.
- // Test case 1
std::wstring test_case_1 = L"history_length_test_page_1.html";
GURL url_1 = GetTestUrl(L"History", test_case_1);
NavigateToURL(url_1);
WaitForFinish("History_Length_Test_1", "1", url_1, kTestCompleteCookie,
- kTestCompleteSuccess, action_max_timeout_ms());
+ kTestCompleteSuccess, action_max_timeout_ms());
+}
+
+// Disabled, http://crbug.com/39785.
+TEST_F(HistoryTester, DISABLED_VerifyHistoryLength2) {
+ // Test the history length for the following page transitions.
+ // -open-> Page 2 -redirect-> Page 3.
- // Test case 2
std::wstring test_case_2 = L"history_length_test_page_2.html";
GURL url_2 = GetTestUrl(L"History", test_case_2);
NavigateToURL(url_2);
WaitForFinish("History_Length_Test_2", "1", url_2, kTestCompleteCookie,
kTestCompleteSuccess, action_max_timeout_ms());
+}
+
+// Disabled, http://crbug.com/39785.
+TEST_F(HistoryTester, DISABLED_VerifyHistoryLength3) {
+ // Test the history length for the following page transitions.
+ // -open-> Page 4 -navigate_backward-> Page 3 -navigate_backward->Page 1
+ // -navigate_forward-> Page 3 -navigate_forward-> Page 4
- // Test case 3
std::wstring test_case_3 = L"history_length_test_page_4.html";
GURL url_3 = GetTestUrl(L"History", test_case_3);
NavigateToURL(url_3);
@@ -69,7 +71,8 @@ TEST_F(HistoryTester, DISABLED_VerifyHistoryLength) {
}
#if defined(OS_WIN) || defined(OS_LINUX)
-TEST_F(HistoryTester, DISABLED_ConsiderRedirectAfterGestureAsUserInitiated) {
+// Flaky, http://crbug.com/39785.
+TEST_F(HistoryTester, FLAKY_ConsiderRedirectAfterGestureAsUserInitiated) {
// Test the history length for the following page transition.
//
// -open-> Page 11 -slow_redirect-> Page 12.
@@ -86,7 +89,9 @@ TEST_F(HistoryTester, DISABLED_ConsiderRedirectAfterGestureAsUserInitiated) {
// Simulate click. This only works for Windows.
scoped_refptr<BrowserProxy> browser = automation()->GetBrowserWindow(0);
+ ASSERT_TRUE(browser.get());
scoped_refptr<WindowProxy> window = browser->GetWindow();
+ ASSERT_TRUE(window.get());
gfx::Rect tab_view_bounds;
ASSERT_TRUE(window->GetViewBounds(VIEW_ID_TAB_CONTAINER, &tab_view_bounds,
true));
@@ -100,7 +105,8 @@ TEST_F(HistoryTester, DISABLED_ConsiderRedirectAfterGestureAsUserInitiated) {
}
#endif // defined(OS_WIN) || defined(OS_LINUX)
-TEST_F(HistoryTester, DISABLED_ConsiderSlowRedirectAsUserInitiated) {
+// Flaky, http://crbug.com/39785.
+TEST_F(HistoryTester, FLAKY_ConsiderSlowRedirectAsUserInitiated) {
// Test the history length for the following page transition.
//
// -open-> Page 21 -redirect-> Page 22.
diff --git a/chrome/test/ui/mouseleave_uitest.cc b/chrome/test/ui/mouseleave_uitest.cc
index 91a269f..be647b2 100644
--- a/chrome/test/ui/mouseleave_uitest.cc
+++ b/chrome/test/ui/mouseleave_uitest.cc
@@ -29,7 +29,7 @@
#elif defined(OS_WIN)
// Test succeeds locally, flaky on trybot
// http://code.google.com/p/chromium/issues/detail?id=26349
-#define MAYBE_TestOnMouseOut DISABLED_TestOnMouseOut
+#define MAYBE_TestOnMouseOut FLAKY_TestOnMouseOut
#endif
namespace {
@@ -47,10 +47,12 @@ class MouseLeaveTest : public UITest {
TEST_F(MouseLeaveTest, MAYBE_TestOnMouseOut) {
GURL test_url = GetTestUrl(L"", L"mouseleave.html");
- scoped_refptr<TabProxy> tab(GetActiveTab());
- ASSERT_TRUE(tab.get());
scoped_refptr<BrowserProxy> browser = automation()->GetBrowserWindow(0);
+ ASSERT_TRUE(browser.get());
scoped_refptr<WindowProxy> window = browser->GetWindow();
+ ASSERT_TRUE(window.get());
+ scoped_refptr<TabProxy> tab(GetActiveTab());
+ ASSERT_TRUE(tab.get());
gfx::Rect tab_view_bounds;
ASSERT_TRUE(window->GetViewBounds(VIEW_ID_TAB_CONTAINER, &tab_view_bounds,
@@ -73,8 +75,7 @@ TEST_F(MouseLeaveTest, MAYBE_TestOnMouseOut) {
// Wait for the onload() handler to complete so we can do the
// next part of the test.
ASSERT_TRUE(WaitUntilCookieValue(
- tab.get(), test_url, "__state", timeout_ms,
- "initial"));
+ tab.get(), test_url, "__state", timeout_ms, "initial"));
// Move the cursor to the top-center of the content, which will trigger
// a javascript onMouseOver event.
@@ -82,8 +83,7 @@ TEST_F(MouseLeaveTest, MAYBE_TestOnMouseOut) {
// Wait on the correct intermediate value of the cookie.
ASSERT_TRUE(WaitUntilCookieValue(
- tab.get(), test_url, "__state", timeout_ms,
- "initial,entered"));
+ tab.get(), test_url, "__state", timeout_ms, "initial,entered"));
// Move the cursor above the content again, which should trigger
// a javascript onMouseOut event.
@@ -91,8 +91,7 @@ TEST_F(MouseLeaveTest, MAYBE_TestOnMouseOut) {
// Wait on the correct final value of the cookie.
ASSERT_TRUE(WaitUntilCookieValue(
- tab.get(), test_url, "__state", timeout_ms,
- "initial,entered,left"));
+ tab.get(), test_url, "__state", timeout_ms, "initial,entered,left"));
}
} // namespace
diff --git a/chrome/test/ui/omnibox_uitest.cc b/chrome/test/ui/omnibox_uitest.cc
index ebf5d7b..6ccb107 100644
--- a/chrome/test/ui/omnibox_uitest.cc
+++ b/chrome/test/ui/omnibox_uitest.cc
@@ -76,7 +76,9 @@ bool OmniboxTest::IsMatch(const std::wstring& input_text,
void OmniboxTest::RunQueryChain(const std::wstring& input_text) {
// Get a handle on the omnibox and give it focus.
scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
+ ASSERT_TRUE(browser.get());
scoped_refptr<WindowProxy> window(browser->GetWindow());
+ ASSERT_TRUE(window.get());
scoped_refptr<AutocompleteEditProxy> autocomplete_edit(
browser->GetAutocompleteEdit());
ASSERT_TRUE(browser->ApplyAccelerator(IDC_FOCUS_LOCATION));
@@ -90,7 +92,7 @@ void OmniboxTest::RunQueryChain(const std::wstring& input_text) {
// matches to be returned to us.
ASSERT_TRUE(autocomplete_edit->SetText(input_text.substr(0, i)));
PerfTimer timer;
- if (autocomplete_edit->WaitForQuery(30000)) {
+ if (autocomplete_edit->WaitForQuery(action_max_timeout_ms())) {
ASSERT_TRUE(autocomplete_edit->GetAutocompleteMatches(&matches));
int64 time_elapsed = timer.Elapsed().InMilliseconds();
diff --git a/chrome/test/ui/v8_benchmark_uitest.cc b/chrome/test/ui/v8_benchmark_uitest.cc
index 792328e..b020af1 100644
--- a/chrome/test/ui/v8_benchmark_uitest.cc
+++ b/chrome/test/ui/v8_benchmark_uitest.cc
@@ -40,6 +40,7 @@ class V8BenchmarkTest : public UITest {
GURL test_url(net::FilePathToFileURL(test_path));
scoped_refptr<TabProxy> tab(GetActiveTab());
+ ASSERT_TRUE(tab.get());
ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(test_url));
// Wait for the test to finish.