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

Unified Diff: chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc

Issue 12605010: Add new option to open history page to show more other devices (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DCHECK_GT Created 7 years, 9 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/toolbar/recent_tabs_sub_menu_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/toolbar/recent_tabs_sub_menu_model_unittest.cc
diff --git a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc
index df354cd5ce93c3baed578bb916b771fa8c44ff1d..6c5553055d0c8e477a2060800752d1dd47c823ff 100644
--- a/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc
+++ b/chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc
@@ -147,10 +147,12 @@ TEST_F(RecentTabsSubMenuModelTest, OtherDevices) {
// 7 <section header for 2nd session>
// 8 <the only tab of window 0 of session 1>
// 9-10 <2 tabs of window 1 of session 2>
+ // 11 <separator>
+ // 12 Devices and history...
TestRecentTabsSubMenuModel model(NULL, browser(), &associator_, true);
int num_items = model.GetItemCount();
- EXPECT_EQ(11, num_items);
+ EXPECT_EQ(13, num_items);
model.ActivatedAt(0);
EXPECT_TRUE(model.IsEnabledAt(0));
model.ActivatedAt(3);
@@ -165,7 +167,8 @@ TEST_F(RecentTabsSubMenuModelTest, OtherDevices) {
EXPECT_TRUE(model.IsEnabledAt(9));
model.ActivatedAt(10);
EXPECT_TRUE(model.IsEnabledAt(10));
- EXPECT_EQ(7, model.enable_count_);
+ EXPECT_TRUE(model.IsEnabledAt(12));
+ EXPECT_EQ(8, model.enable_count_);
EXPECT_EQ(7, model.execute_count_);
}
@@ -181,7 +184,7 @@ TEST_F(RecentTabsSubMenuModelTest, MaxSessionsAndRecency) {
// Verify that data is populated correctly in RecentTabsSubMenuModel.
// Expected menu:
- // - max sessions is 3, so only 3 most-recent sessions will show
+ // - max sessions is 3, so only 3 most-recent sessions will show.
// Menu index Menu items
// --------------------------------------
// 0 Reopen closed tab
@@ -194,10 +197,12 @@ TEST_F(RecentTabsSubMenuModelTest, MaxSessionsAndRecency) {
// 7 <separator>
// 8 <section header for 3rd session>
// 9 <the only tab of the only window of session 1>
+ // 10 <separator>
+ // 11 Devices and history...
TestRecentTabsSubMenuModel model(NULL, browser(), &associator_, true);
int num_items = model.GetItemCount();
- EXPECT_EQ(10, num_items);
+ EXPECT_EQ(12, num_items);
std::vector<string16> tab_titles =
recent_tabs_builder.GetTabTitlesSortedByRecency();
@@ -219,18 +224,20 @@ TEST_F(RecentTabsSubMenuModelTest, MaxTabsPerSessionAndRecency) {
// Verify that data is populated correctly in RecentTabsSubMenuModel.
// Expected menu:
- // - max tabs per session is 4, so only 4 most-recent tabs will show,
- // independent of which window they came from
+ // - max tabs per session is 4, so only 4 most-recent tabs will show,
+ // independent of which window they came from.
// Menu index Menu items
// --------------------------------------
// 0 Reopen closed tab
// 1 <separator>
// 2 <section header for session>
// 3-6 <4 most-recent tabs of session>
+ // 7 <separator>
+ // 8 Devices and history...
TestRecentTabsSubMenuModel model(NULL, browser(), &associator_, true);
int num_items = model.GetItemCount();
- EXPECT_EQ(7, num_items);
+ EXPECT_EQ(9, num_items);
std::vector<string16> tab_titles =
recent_tabs_builder.GetTabTitlesSortedByRecency();
@@ -252,9 +259,11 @@ TEST_F(RecentTabsSubMenuModelTest, MaxWidth) {
// 1 <separator>
// 2 <section header for 1st session>
// 3 <the only tab of the only window of session 1>
+ // 4 <separator>
+ // 5 Devices and history...
TestRecentTabsSubMenuModel model(NULL, browser(), &associator_, true);
- EXPECT_EQ(4, model.GetItemCount());
+ EXPECT_EQ(6, model.GetItemCount());
EXPECT_EQ(-1, model.GetMaxWidthForItemAtIndex(0));
EXPECT_NE(-1, model.GetMaxWidthForItemAtIndex(1));
EXPECT_NE(-1, model.GetMaxWidthForItemAtIndex(2));
« no previous file with comments | « chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698