diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 21:42:33 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 21:42:33 +0000 |
commit | 015ed8bbc256a94f03dacf13e93c05e4eff25dcd (patch) | |
tree | 479976899d3e957a77da598bb05ee145876219be /chrome/browser/sessions/session_restore_uitest.cc | |
parent | 71d1ab42f849b22bc26bcf2756d5d664a5454884 (diff) | |
download | chromium_src-015ed8bbc256a94f03dacf13e93c05e4eff25dcd.zip chromium_src-015ed8bbc256a94f03dacf13e93c05e4eff25dcd.tar.gz chromium_src-015ed8bbc256a94f03dacf13e93c05e4eff25dcd.tar.bz2 |
ifdef out tests that don't apply to the Mac
The reason these tests were failing on the Mac is that they test something that the Mac explicitly doesn't support: opening a new window in the existing browser process by re-running from the command line. This ifdefs out the tests that don't apply to the Mac, and the helper method that they are built on so that new tests using it won't accidentally be run on the Mac.
BUG=45108
TEST=N/A
Review URL: http://codereview.chromium.org/3394018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60354 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sessions/session_restore_uitest.cc')
-rw-r--r-- | chrome/browser/sessions/session_restore_uitest.cc | 69 |
1 files changed, 33 insertions, 36 deletions
diff --git a/chrome/browser/sessions/session_restore_uitest.cc b/chrome/browser/sessions/session_restore_uitest.cc index df29c13..949bdf4 100644 --- a/chrome/browser/sessions/session_restore_uitest.cc +++ b/chrome/browser/sessions/session_restore_uitest.cc @@ -327,10 +327,10 @@ TEST_F(SessionRestoreUITest, NormalAndPopup) { } } -#if defined(OS_MACOSX) -// Fails an SQL assertion on Mac: http://crbug.com/45108 -#define DontRestoreWhileIncognito DISABLED_DontRestoreWhileIncognito -#endif +#if !defined(OS_MACOSX) +// These tests don't apply to the Mac version; see +// LaunchAnotherBrowserBlockUntilClosed for details. + // Creates a browser, goes incognito, closes browser, launches and make sure // we don't restore. // @@ -376,38 +376,6 @@ TEST_F(SessionRestoreUITest, DontRestoreWhileIncognito) { ASSERT_TRUE(url != url1_); } -// Creates two windows, closes one, restores, make sure only one window open. -TEST_F(SessionRestoreUITest, TwoWindowsCloseOneRestoreOnlyOne) { - NavigateToURL(url1_); - - // Make sure we have one window. - int window_count; - ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); - ASSERT_EQ(1, window_count); - - // Open a second window. - ASSERT_TRUE(automation()->OpenNewBrowserWindow(Browser::TYPE_NORMAL, - true)); - ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); - ASSERT_EQ(2, window_count); - - // Close it. - CloseWindow(1, 2); - - // Restart and make sure we have only one window with one tab and the url - // is url1_. - QuitBrowserAndRestore(1); - - AssertOneWindowWithOneTab(); - - ASSERT_EQ(url1_, GetActiveTabURL()); -} - -#if defined(OS_MACOSX) -// Fails an SQL assertion on Mac: http://crbug.com/45108 -#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, @@ -438,6 +406,35 @@ TEST_F(SessionRestoreUITest, ASSERT_EQ(url1_, GetActiveTabURL()); } +#endif // !OS_MACOSX + +// Creates two windows, closes one, restores, make sure only one window open. +TEST_F(SessionRestoreUITest, TwoWindowsCloseOneRestoreOnlyOne) { + NavigateToURL(url1_); + + // Make sure we have one window. + int window_count; + ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); + ASSERT_EQ(1, window_count); + + // Open a second window. + ASSERT_TRUE(automation()->OpenNewBrowserWindow(Browser::TYPE_NORMAL, + true)); + ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); + ASSERT_EQ(2, window_count); + + // Close it. + CloseWindow(1, 2); + + // Restart and make sure we have only one window with one tab and the url + // is url1_. + QuitBrowserAndRestore(1); + + AssertOneWindowWithOneTab(); + + ASSERT_EQ(url1_, GetActiveTabURL()); +} + #if defined(OS_LINUX) || defined(OS_MACOSX) // Flaky, sometimes times out: http://crbug.com/52022 #define MAYBE_ShareProcessesOnRestore FLAKY_ShareProcessesOnRestore |