summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sessions/session_service_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/sessions/session_service_unittest.cc')
-rw-r--r--chrome/browser/sessions/session_service_unittest.cc53
1 files changed, 0 insertions, 53 deletions
diff --git a/chrome/browser/sessions/session_service_unittest.cc b/chrome/browser/sessions/session_service_unittest.cc
index 1fec7f3..19997e7 100644
--- a/chrome/browser/sessions/session_service_unittest.cc
+++ b/chrome/browser/sessions/session_service_unittest.cc
@@ -397,9 +397,6 @@ TEST_F(SessionServiceTest, WindowCloseCommittedAfterNavigate) {
// Makes sure we don't track popups.
TEST_F(SessionServiceTest, IgnorePopups) {
- if (browser_defaults::kRestorePopups)
- return; // This test is only applicable if popups aren't restored.
-
SessionID window2_id;
SessionID tab_id;
SessionID tab2_id;
@@ -434,56 +431,6 @@ TEST_F(SessionServiceTest, IgnorePopups) {
helper_.AssertNavigationEquals(nav1, tab->navigations[0]);
}
-// Makes sure we track popups.
-TEST_F(SessionServiceTest, RestorePopup) {
- if (!browser_defaults::kRestorePopups)
- return; // This test is only applicable if popups are restored.
-
- SessionID window2_id;
- SessionID tab_id;
- SessionID tab2_id;
- ASSERT_NE(window2_id.id(), window_id.id());
-
- service()->SetWindowType(window2_id, Browser::TYPE_POPUP);
- service()->SetWindowBounds(window2_id, window_bounds, false);
-
- TabNavigation nav1(0, GURL("http://google.com"), GURL(),
- ASCIIToUTF16("abc"), "def",
- PageTransition::QUALIFIER_MASK);
- TabNavigation nav2(0, GURL("http://google2.com"), GURL(),
- ASCIIToUTF16("abcd"), "defg",
- PageTransition::AUTO_BOOKMARK);
-
- helper_.PrepareTabInWindow(window_id, tab_id, 0, true);
- UpdateNavigation(window_id, tab_id, nav1, 0, true);
-
- helper_.PrepareTabInWindow(window2_id, tab2_id, 0, false);
- UpdateNavigation(window2_id, tab2_id, nav2, 0, true);
-
- ScopedVector<SessionWindow> windows;
- ReadWindows(&(windows.get()));
-
- ASSERT_EQ(2U, windows->size());
- int normal_index = windows[0]->type == Browser::TYPE_NORMAL ?
- 0 : 1;
- int popup_index = normal_index == 0 ? 1 : 0;
- ASSERT_EQ(0, windows[normal_index]->selected_tab_index);
- ASSERT_EQ(window_id.id(), windows[normal_index]->window_id.id());
- ASSERT_EQ(1U, windows[normal_index]->tabs.size());
-
- SessionTab* tab = windows[normal_index]->tabs[0];
- helper_.AssertTabEquals(window_id, tab_id, 0, 0, 1, *tab);
- helper_.AssertNavigationEquals(nav1, tab->navigations[0]);
-
- ASSERT_EQ(0, windows[popup_index]->selected_tab_index);
- ASSERT_EQ(window2_id.id(), windows[popup_index]->window_id.id());
- ASSERT_EQ(1U, windows[popup_index]->tabs.size());
-
- tab = windows[popup_index]->tabs[0];
- helper_.AssertTabEquals(window2_id, tab2_id, 0, 0, 1, *tab);
- helper_.AssertNavigationEquals(nav2, tab->navigations[0]);
-}
-
// Tests pruning from the front.
TEST_F(SessionServiceTest, PruneFromFront) {
const std::string base_url("http://google.com/");