diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-06 21:00:01 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-06 21:00:01 +0000 |
commit | 668cd428d8cb73e496067e866ffc57524665e756 (patch) | |
tree | e263e77bff92aed13f86e30d1ecabb51baca2257 /chrome/browser/sessions/session_restore_uitest.cc | |
parent | 39fc6471702683395aac43277fd2b95da5dfbb4d (diff) | |
download | chromium_src-668cd428d8cb73e496067e866ffc57524665e756.zip chromium_src-668cd428d8cb73e496067e866ffc57524665e756.tar.gz chromium_src-668cd428d8cb73e496067e866ffc57524665e756.tar.bz2 |
Attempt 2 at changing session restores handling of incognito
windows. Previously when closing the last non-incognito window while
an incognito window was open resulted in clearing out the current
session. Now the session is not cleared out.
BUG=31540
TEST=see bug, also covered by tests
R=brettw@chromium.org,kuan@chromium.org
Review URL: http://codereview.chromium.org/6693084
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80691 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 | 48 |
1 files changed, 1 insertions, 47 deletions
diff --git a/chrome/browser/sessions/session_restore_uitest.cc b/chrome/browser/sessions/session_restore_uitest.cc index 1262e75..9e6e609b 100644 --- a/chrome/browser/sessions/session_restore_uitest.cc +++ b/chrome/browser/sessions/session_restore_uitest.cc @@ -335,55 +335,9 @@ TEST_F(SessionRestoreUITest, NormalAndPopup) { } #if !defined(OS_MACOSX) -// These tests don't apply to the Mac version; see +// This test doesn'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. -// -TEST_F(SessionRestoreUITest, DontRestoreWhileIncognito) { - NavigateToURL(url1_); - - // Make sure we have one window. - int initial_window_count; - ASSERT_TRUE(automation()->GetBrowserWindowCount(&initial_window_count)); - ASSERT_EQ(1, initial_window_count); - - scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0)); - ASSERT_TRUE(browser_proxy.get()); - - // Create an incognito window. - ASSERT_TRUE(browser_proxy->RunCommand(IDC_NEW_INCOGNITO_WINDOW)); - int window_count; - ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count)); - ASSERT_EQ(2, window_count); - - // Close the first window. - CloseWindow(0, 2); - browser_proxy = NULL; - - // Launch the browser again. Note, this doesn't spawn a new process, instead - // it attaches to the current process. - include_testing_id_ = false; - clear_profile_ = false; - launch_arguments_.AppendSwitch(switches::kRestoreLastSession); - LaunchAnotherBrowserBlockUntilClosed(launch_arguments_); - - // A new window should appear; - ASSERT_TRUE(automation()->WaitForWindowCountToBecome(2)); - - // And it shouldn't have url1_ in it. - browser_proxy = automation()->GetBrowserWindow(1); - ASSERT_TRUE(browser_proxy.get()); - scoped_refptr<TabProxy> tab_proxy(browser_proxy->GetTab(0)); - ASSERT_TRUE(tab_proxy.get()); - ASSERT_TRUE(tab_proxy->WaitForTabToBeRestored( - TestTimeouts::action_max_timeout_ms())); - GURL url; - ASSERT_TRUE(tab_proxy->GetCurrentURL(&url)); - ASSERT_TRUE(url != url1_); -} - // Launches an app window, closes tabbed browser, launches and makes sure // we restore the tabbed browser url. // Flaky: http://crbug.com/29110 |