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)); |
+} |