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

Unified Diff: chrome/browser/tabs/tab_strip_selection_model_unittest.cc

Issue 7215003: Multi-tab: Adding new Notification when tab selection changes (again). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing Created 9 years, 6 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/tabs/tab_strip_selection_model.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tabs/tab_strip_selection_model_unittest.cc
diff --git a/chrome/browser/tabs/tab_strip_selection_model_unittest.cc b/chrome/browser/tabs/tab_strip_selection_model_unittest.cc
index 121ef655f3d745d709eb58df02de35b703d9493b..ec1893207f12248669231ac41cf11463ad3a2012 100644
--- a/chrome/browser/tabs/tab_strip_selection_model_unittest.cc
+++ b/chrome/browser/tabs/tab_strip_selection_model_unittest.cc
@@ -173,3 +173,20 @@ TEST_F(TabStripSelectionModelTest, AddSelectionFromAnchorTo) {
model.AddSelectionFromAnchorTo(0);
EXPECT_EQ("active=0 anchor=2 selection=0 1 2 3 4", StateAsString(model));
}
+
+TEST_F(TabStripSelectionModelTest, Equals) {
+ TabStripSelectionModel model1;
+ model1.SetSelectedIndex(0);
+ model1.AddSelectionFromAnchorTo(4);
+
+ TabStripSelectionModel model2;
+ model2.SetSelectedIndex(0);
+ model2.AddSelectionFromAnchorTo(4);
+
+ EXPECT_TRUE(model1.Equals(model2));
+ EXPECT_TRUE(model2.Equals(model1));
+
+ model2.SetSelectedIndex(0);
+ EXPECT_FALSE(model1.Equals(model2));
+ EXPECT_FALSE(model2.Equals(model1));
+}
« no previous file with comments | « chrome/browser/tabs/tab_strip_selection_model.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698