Commit 6911f6c7 authored by Wei Li's avatar Wei Li Committed by Commit Bot

Re-enable start up tests that were flaky on Linux

WelcomeBackStandardNoPolicy and UpdateWithTwoProfiles were disabled
because they were falky on Linux. After some minor fix, they are now
ready to be re-enabled.

BUG=379579

Change-Id: I2e2a79761b4ab6e0f5c9fb18daa3ae80ed9c282a
Reviewed-on: https://chromium-review.googlesource.com/c/1354681Reviewed-by: default avatarTommy Martino <tmartino@chromium.org>
Commit-Queue: Wei Li <weili@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612361}
parent 53e8b2a2
......@@ -648,13 +648,19 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, PRE_UpdateWithTwoProfiles) {
// Create two profiles.
base::FilePath dest_path = profile_manager->user_data_dir();
Profile* profile1 = profile_manager->GetProfile(
dest_path.Append(FILE_PATH_LITERAL("New Profile 1")));
ASSERT_TRUE(profile1);
Profile* profile1 = nullptr;
Profile* profile2 = nullptr;
{
base::ScopedAllowBlockingForTesting allow_blocking;
profile1 = profile_manager->GetProfile(
dest_path.Append(FILE_PATH_LITERAL("New Profile 1")));
ASSERT_TRUE(profile1);
Profile* profile2 = profile_manager->GetProfile(
dest_path.Append(FILE_PATH_LITERAL("New Profile 2")));
ASSERT_TRUE(profile2);
profile2 = profile_manager->GetProfile(
dest_path.Append(FILE_PATH_LITERAL("New Profile 2")));
ASSERT_TRUE(profile2);
}
DisableWelcomePages({profile1, profile2});
// Open some urls with the browsers, and close them.
Browser* browser1 =
......@@ -693,10 +699,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, PRE_UpdateWithTwoProfiles) {
profile2->GetPrefs()->CommitPendingWrite();
}
// See crbug.com/376184 about improvements to this test on Mac.
// Disabled because it's flaky. http://crbug.com/379579
IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
DISABLED_UpdateWithTwoProfiles) {
IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, UpdateWithTwoProfiles) {
// Make StartupBrowserCreator::WasRestarted() return true.
StartupBrowserCreator::was_restarted_read_ = false;
PrefService* pref_service = g_browser_process->local_state();
......@@ -707,13 +710,18 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
// Open the two profiles.
base::FilePath dest_path = profile_manager->user_data_dir();
Profile* profile1 = profile_manager->GetProfile(
dest_path.Append(FILE_PATH_LITERAL("New Profile 1")));
ASSERT_TRUE(profile1);
Profile* profile1 = nullptr;
Profile* profile2 = nullptr;
{
base::ScopedAllowBlockingForTesting allow_blocking;
profile1 = profile_manager->GetProfile(
dest_path.Append(FILE_PATH_LITERAL("New Profile 1")));
ASSERT_TRUE(profile1);
Profile* profile2 = profile_manager->GetProfile(
dest_path.Append(FILE_PATH_LITERAL("New Profile 2")));
ASSERT_TRUE(profile2);
profile2 = profile_manager->GetProfile(
dest_path.Append(FILE_PATH_LITERAL("New Profile 2")));
ASSERT_TRUE(profile2);
}
// Simulate a launch after a browser update.
base::CommandLine dummy(base::CommandLine::NO_PROGRAM);
......@@ -1434,13 +1442,8 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorWelcomeBackTest,
}
#endif // defined(OS_WIN)
#if defined(OS_LINUX)
#define MAYBE_WelcomeBackStandardNoPolicy DISABLED_WelcomeBackStandardNoPolicy
#else
#define MAYBE_WelcomeBackStandardNoPolicy WelcomeBackStandardNoPolicy
#endif
IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorWelcomeBackTest,
MAYBE_WelcomeBackStandardNoPolicy) {
WelcomeBackStandardNoPolicy) {
ASSERT_NO_FATAL_FAILURE(
StartBrowser(StartupBrowserCreator::WelcomeBackPage::kWelcomeStandard,
PolicyVariant()));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment