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

Unified Diff: ash/launcher/launcher_navigator_unittest.cc

Issue 10905201: Move app list (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extra nl 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
Index: ash/launcher/launcher_navigator_unittest.cc
diff --git a/ash/launcher/launcher_navigator_unittest.cc b/ash/launcher/launcher_navigator_unittest.cc
index 3bef6ee238c389adc3dc42e31e50108c2deabf9a..faa24411bfa908cfd7419bb21a2d4acbb04af764 100644
--- a/ash/launcher/launcher_navigator_unittest.cc
+++ b/ash/launcher/launcher_navigator_unittest.cc
@@ -61,25 +61,24 @@ TEST_F(LauncherNavigatorTest, BasicCycle) {
};
// LauncherModel automatically adds BROWSER_SHORTCUT item at the
// beginning, so '2' refers the first TYPE_TABBED item.
Mattias Nissler (ping if slow) 2012/09/11 08:42:30 comment stale.
DaveMoore 2012/09/11 17:07:00 Done.
- SetupMockLauncherModel(types, arraysize(types), 2);
+ SetupMockLauncherModel(types, arraysize(types), 3);
- EXPECT_EQ(3, GetNextActivatedItemIndex(model(), CYCLE_FORWARD));
+ EXPECT_EQ(4, GetNextActivatedItemIndex(model(), CYCLE_FORWARD));
// Fourth one. It will skip the APP_SHORTCUT at the beginning of the list and
// the APP_LIST item which is automatically added at the end of items.
- EXPECT_EQ(4, GetNextActivatedItemIndex(model(), CYCLE_BACKWARD));
+ EXPECT_EQ(5, GetNextActivatedItemIndex(model(), CYCLE_BACKWARD));
}
TEST_F(LauncherNavigatorTest, WrapToBeginning) {
LauncherItemType types[] = {
TYPE_APP_SHORTCUT, TYPE_TABBED, TYPE_TABBED, TYPE_TABBED,
};
- SetupMockLauncherModel(types, arraysize(types), 4);
+ SetupMockLauncherModel(types, arraysize(types), 5);
- // Second one. It skips the APP_LIST item at the end of the list,
- // wraps to the beginning, and skips BROWSER_SHORTCUT and APP_SHORTCUT
- // at the beginning of the list.
- EXPECT_EQ(2, GetNextActivatedItemIndex(model(), CYCLE_FORWARD));
+ // Second one. It starts a the end, wraps to the beginning, and skips
Mattias Nissler (ping if slow) 2012/09/11 08:42:30 s/a/at/
DaveMoore 2012/09/11 17:07:00 Done.
+ // APP_LIST, BROWSER_SHORTCUT and APP_SHORTCUT at the beginning of the list.
+ EXPECT_EQ(3, GetNextActivatedItemIndex(model(), CYCLE_FORWARD));
}
TEST_F(LauncherNavigatorTest, Empty) {
@@ -90,7 +89,7 @@ TEST_F(LauncherNavigatorTest, Empty) {
TEST_F(LauncherNavigatorTest, SingleEntry) {
LauncherItemType type = TYPE_TABBED;
- SetupMockLauncherModel(&type, 1, 1);
+ SetupMockLauncherModel(&type, 1, 2);
// If there's only one item there and it is already active, there's no item
// to be activated next.
@@ -106,8 +105,8 @@ TEST_F(LauncherNavigatorTest, NoActive) {
SetupMockLauncherModel(types, arraysize(types), -1);
// If there are no active status, pick the first running item as a fallback.
- EXPECT_EQ(1, GetNextActivatedItemIndex(model(), CYCLE_FORWARD));
- EXPECT_EQ(1, GetNextActivatedItemIndex(model(), CYCLE_BACKWARD));
+ EXPECT_EQ(2, GetNextActivatedItemIndex(model(), CYCLE_FORWARD));
+ EXPECT_EQ(2, GetNextActivatedItemIndex(model(), CYCLE_BACKWARD));
}
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698