Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7799)

Unified Diff: chrome/browser/ui/tabs/tab_strip_model_unittest.cc

Issue 10937028: Do not discard selected tab (Closed) Base URL: http://git.chromium.org/chromium/src.git@new
Patch Set: handle active tab Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/tabs/tab_strip_model.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/tabs/tab_strip_model_unittest.cc
diff --git a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc
index 17b1b1d3239f3a218557dc42bfa5e59015420c7a..fef2ea0f3b9769f7d058ac54087fbb8371bdc4ce 100644
--- a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc
@@ -2205,12 +2205,11 @@ TEST_F(TabStripModelTest, DiscardTabContentsAt) {
EXPECT_FALSE(tabstrip.IsTabDiscarded(0));
EXPECT_FALSE(tabstrip.IsTabDiscarded(1));
- // Discarding the active tab should not crash.
- TabContents* null_contents3 = tabstrip.DiscardTabContentsAt(0);
+ // Don't discard active tab.
+ tabstrip.DiscardTabContentsAt(0);
ASSERT_EQ(2, tabstrip.count());
- EXPECT_TRUE(tabstrip.IsTabDiscarded(0));
+ EXPECT_FALSE(tabstrip.IsTabDiscarded(0));
EXPECT_FALSE(tabstrip.IsTabDiscarded(1));
- ASSERT_EQ(null_contents3, tabstrip.GetTabContentsAt(0));
tabstrip.CloseAllTabs();
}
« no previous file with comments | « chrome/browser/ui/tabs/tab_strip_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698