From c82eaa5262da607ff04069cefcf67df4cf5bbcb1 Mon Sep 17 00:00:00 2001 From: "oshima@chromium.org" Date: Wed, 25 Nov 2009 22:18:13 +0000 Subject: Flaky tests on linux/view/64bit builds. Also updated browser_tests to use #define instead of #if/else, like other tests. BUG=28808 TEST=None Review URL: http://codereview.chromium.org/442012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33137 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/browser_encoding_uitest.cc | 7 +++++++ chrome/browser/process_singleton_linux_uitest.cc | 7 +++++++ chrome/browser/sessions/session_restore_uitest.cc | 6 ++++++ chrome/browser/ssl/ssl_browser_tests.cc | 18 ++++++++---------- chrome/browser/views/find_bar_host_browsertest.cc | 8 +++----- .../test/automated_ui_tests/automated_ui_test_test.cc | 9 ++++++++- chrome/worker/worker_uitest.cc | 7 +++++++ 7 files changed, 46 insertions(+), 16 deletions(-) (limited to 'chrome') diff --git a/chrome/browser/browser_encoding_uitest.cc b/chrome/browser/browser_encoding_uitest.cc index 8d68314..18c3279 100644 --- a/chrome/browser/browser_encoding_uitest.cc +++ b/chrome/browser/browser_encoding_uitest.cc @@ -47,6 +47,13 @@ class BrowserEncodingTest : public UITest { FilePath temp_sub_resource_dir_; }; +#if defined(OS_CHROMEOS) +// These tests are flaky on linux/views builds. +// See http://crbug.com/28808. +#define TestEncodingAliasMapping FLAKY_TestEncodingAliasMapping +#define TestEncodingAutoDetect FLAKY_TestEncodingAutoDetect +#endif + // TODO(jnd): 1. Some encodings are missing here. It'll be added later. See // http://crbug.com/13306. // 2. Add more files with multiple encoding name variants for each canonical diff --git a/chrome/browser/process_singleton_linux_uitest.cc b/chrome/browser/process_singleton_linux_uitest.cc index 795a023..0c3a63c 100644 --- a/chrome/browser/process_singleton_linux_uitest.cc +++ b/chrome/browser/process_singleton_linux_uitest.cc @@ -81,6 +81,13 @@ TEST_F(ProcessSingletonLinuxTest, CheckSocketFile) { ASSERT_TRUE(S_ISSOCK(statbuf.st_mode)); } +#if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) +// This test is flaky on linux/views builds. +// See http://crbug.com/28808. +#define NotifyOtherProcessSuccess FLAKY_NotifyOtherProcessSuccess +#define NotifyOtherProcessHostChanged FLAKY_NotifyOtherProcessHostChanged +#endif + // TODO(james.su@gmail.com): port following tests to Windows. // Test success case of NotifyOtherProcess(). TEST_F(ProcessSingletonLinuxTest, NotifyOtherProcessSuccess) { diff --git a/chrome/browser/sessions/session_restore_uitest.cc b/chrome/browser/sessions/session_restore_uitest.cc index 99ec382..6d4417f 100644 --- a/chrome/browser/sessions/session_restore_uitest.cc +++ b/chrome/browser/sessions/session_restore_uitest.cc @@ -254,6 +254,12 @@ TEST_F(SessionRestoreUITest, ClosedTabStaysClosed) { ASSERT_TRUE(GetActiveTabURL() == url1_); } +#if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) +// This test is flaky on linux/views builds. +// See http://crbug.com/28808. +#define NormalAndPopup FLAKY_NormalAndPopup +#endif + // Creates a tabbed browser and popup and makes sure we restore both. TEST_F(SessionRestoreUITest, NormalAndPopup) { if (!browser_defaults::kRestorePopups) diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc index e624856..76b6a26 100644 --- a/chrome/browser/ssl/ssl_browser_tests.cc +++ b/chrome/browser/ssl/ssl_browser_tests.cc @@ -220,19 +220,19 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestHTTPSExpiredCertAndDontProceed) { CheckUnauthenticatedState(tab); } -// Open a page with a HTTPS error in a tab with no prior navigation (through a -// link with a blank target). This is to test that the lack of navigation entry -// does not cause any problems (it was causing a crasher, see -// http://crbug.com/19941). -#if !defined(OS_LINUX) || !defined(TOOLKIT_VIEWS) -IN_PROC_BROWSER_TEST_F(SSLUITest, TestHTTPSErrorWithNoNavEntry) { -#else +#if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) // TODO(jcampan|oshima): On linux/views, the WaitForLoadStop call // below sometimes waits forever because LOAD_STOP notification can // happen before WaitLorLoadStop is called. Marking this test as Fleaky. // See http://crbug/28098. -IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestHTTPSErrorWithNoNavEntry) { +#define TestHTTPSErrorWithNoNavEntry FLAKY_TestHTTPSErrorWithNoNavEntry #endif + +// Open a page with a HTTPS error in a tab with no prior navigation (through a +// link with a blank target). This is to test that the lack of navigation entry +// does not cause any problems (it was causing a crasher, see +// http://crbug.com/19941). +IN_PROC_BROWSER_TEST_F(SSLUITest, TestHTTPSErrorWithNoNavEntry) { scoped_refptr http_server = PlainServer(); ASSERT_TRUE(http_server.get() != NULL); scoped_refptr bad_https_server = BadCertServer(); @@ -257,13 +257,11 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestHTTPSErrorWithNoNavEntry) { EXPECT_EQ(2, browser()->tab_count()); EXPECT_EQ(1, browser()->selected_index()); -#if !defined(OS_LINUX) || !defined(TOOLKIT_VIEWS) // Since the navigation was initiated by the renderer (when we clicked on the // link) and since the main page network request failed, we won't get a // navigation entry committed. So we'll just wait for the load to stop. ui_test_utils::WaitForLoadStop( &(browser()->GetSelectedTabContents()->controller())); -#endif // We should have an interstitial page showing. ASSERT_TRUE(browser()->GetSelectedTabContents()->interstitial_page()); diff --git a/chrome/browser/views/find_bar_host_browsertest.cc b/chrome/browser/views/find_bar_host_browsertest.cc index 383ebe5..f160da0 100644 --- a/chrome/browser/views/find_bar_host_browsertest.cc +++ b/chrome/browser/views/find_bar_host_browsertest.cc @@ -471,14 +471,12 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, } // Make sure Find box disappears on Navigate but not on Refresh. -#if defined(OS_LINUX) +#if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) // The last EXPECT_FALSE(fully_visible) is flaky (especially on // 64bit build.). See bug http://crbug.com/28629. -IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, - FLAKY_FindDisappearOnNavigate) { -#else -IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindDisappearOnNavigate) { +#define FindDisappearOnNavigate FLAKY_FindDisappearOnNavigate #endif +IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindDisappearOnNavigate) { HTTPTestServer* server = StartHTTPServer(); // First we navigate to our special focus tracking page. diff --git a/chrome/test/automated_ui_tests/automated_ui_test_test.cc b/chrome/test/automated_ui_tests/automated_ui_test_test.cc index c913717..285a387 100644 --- a/chrome/test/automated_ui_tests/automated_ui_test_test.cc +++ b/chrome/test/automated_ui_tests/automated_ui_test_test.cc @@ -62,7 +62,14 @@ TEST_F(AutomatedUITestBase, Home) { EXPECT_EQ(L"", title); } -TEST_F(AutomatedUITestBase, NewTab) { +#if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) +// These tests are flaky on linux/views builds. +// See http://crbug.com/28808. +#define OpenNewTabTest FLAKY_OpenNewTab +#define OpenBrowserWindow FLAKY_OpenBrowserWindow +#endif + +TEST_F(AutomatedUITestBase, OpenNewTab) { int tab_count; active_browser()->GetTabCount(&tab_count); ASSERT_EQ(1, tab_count); diff --git a/chrome/worker/worker_uitest.cc b/chrome/worker/worker_uitest.cc index 31633d2..93ceca2 100644 --- a/chrome/worker/worker_uitest.cc +++ b/chrome/worker/worker_uitest.cc @@ -122,6 +122,13 @@ TEST_F(WorkerTest, WorkerFastLayoutTests) { #define SharedWorkerFastLayoutTests DISABLED_SharedWorkerFastLayoutTests #endif +#if defined(OS_LINUX) && defined(TOOLKIT_VIEWS) +// These tests are flaky on linux/views builds. +// See http://crbug.com/28808. +#define MessagePorts FLAKY_MessagePorts +#define SharedWorkerFastLayoutTests FLAKY_SharedWorkerFastLayoutTests +#endif + TEST_F(WorkerTest, SharedWorkerFastLayoutTests) { static const char* kLayoutTestFiles[] = { "shared-worker-constructor.html", -- cgit v1.1