diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-16 01:05:32 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-16 01:05:32 +0000 |
commit | 6044824e6c218ea5c801934ac52b88d3b10f89eb (patch) | |
tree | c8a246c80f760e7c105c8bca0c0e56adbfdd7860 /chrome | |
parent | 1bedbbfefef046796dfa089010a201ff269c7418 (diff) | |
download | chromium_src-6044824e6c218ea5c801934ac52b88d3b10f89eb.zip chromium_src-6044824e6c218ea5c801934ac52b88d3b10f89eb.tar.gz chromium_src-6044824e6c218ea5c801934ac52b88d3b10f89eb.tar.bz2 |
Use LaunchAnotherBrowserBlockUntilClosed in SessionRestoreUITest to reduce flake.
Re-enables FLAKY_RestoreAfterClosingTabbedBrowserWithAppAndLaunching on linux.
(Using LaunchBrowser caused the process_id_ of UITest to get overwritten with the pid of the short-lived browser that sent a notification to the existing browser, so when it came time to shut down the existing browser it wouldn't send the proper shutdown commands.)
BUG=40946,39490,29110
TEST=run SessionRestoreUITest.FLAKY_RestoreAfterClosingTabbedBrowserWithAppAndLaunching and FLAKY_DontRestoreWhileIncognito a bunch
Review URL: http://codereview.chromium.org/1648012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44732 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/sessions/session_restore_uitest.cc | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/chrome/browser/sessions/session_restore_uitest.cc b/chrome/browser/sessions/session_restore_uitest.cc index 88406fe..94d2a06 100644 --- a/chrome/browser/sessions/session_restore_uitest.cc +++ b/chrome/browser/sessions/session_restore_uitest.cc @@ -352,10 +352,9 @@ TEST_F(SessionRestoreUITest, FLAKY_DontRestoreWhileIncognito) { // Launch the browser again. Note, this doesn't spawn a new process, instead // it attaches to the current process. include_testing_id_ = false; - use_existing_browser_ = true; clear_profile_ = false; launch_arguments_.AppendSwitch(switches::kRestoreLastSession); - LaunchBrowser(launch_arguments_, false); + LaunchAnotherBrowserBlockUntilClosed(launch_arguments_); // A new window should appear; ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2)); @@ -399,12 +398,6 @@ TEST_F(SessionRestoreUITest, FLAKY_TwoWindowsCloseOneRestoreOnlyOne) { ASSERT_EQ(url1_, GetActiveTabURL()); } -#if defined(OS_LINUX) -// Disabled on linux - http://crbug.com/40946. -#define FLAKY_RestoreAfterClosingTabbedBrowserWithAppAndLaunching \ - DISABLED_RestoreAfterClosingTabbedBrowserWithAppAndLaunching -#endif - // Launches an app window, closes tabbed browser, launches and makes sure // we restore the tabbed browser url. TEST_F(SessionRestoreUITest, @@ -414,14 +407,12 @@ TEST_F(SessionRestoreUITest, // Launch an app. bool include_testing_id_orig = include_testing_id_; - bool use_existing_browser_orig = use_existing_browser_; include_testing_id_ = false; - use_existing_browser_ = true; clear_profile_ = false; CommandLine app_launch_arguments = launch_arguments_; app_launch_arguments.AppendSwitchWithValue(switches::kApp, UTF8ToWide(url2_.spec())); - LaunchBrowser(app_launch_arguments, false); + LaunchAnotherBrowserBlockUntilClosed(app_launch_arguments); ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2)); // Close the first window. The only window left is the App window. @@ -430,7 +421,6 @@ TEST_F(SessionRestoreUITest, // Restore the session, which should bring back the first window with url1_. // First restore the settings so we can connect to the browser. include_testing_id_ = include_testing_id_orig; - use_existing_browser_ = use_existing_browser_orig; // Restore the session with 1 tab. QuitBrowserAndRestore(1); |