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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc

Issue 10905201: Move app list (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review issues 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/ash/launcher/chrome_launcher_controller_browsertest.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/ash/launcher/chrome_launcher_controller_unittest.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
index 307a4e74bde62b443751a19843b242dcd4f93482..0e92da3710537a6e891c66fc1bdced3169d001ef 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
@@ -27,6 +27,10 @@
using extensions::Extension;
+namespace {
+const int kExpectedAppIndex = 2;
+}
+
class ChromeLauncherControllerTest : public testing::Test {
protected:
ChromeLauncherControllerTest()
@@ -125,7 +129,7 @@ TEST_F(ChromeLauncherControllerTest, DefaultApps) {
// Installing |extension3_| should add it to the launcher.
extension_service_->AddExtension(extension3_.get());
EXPECT_EQ(3, model_.item_count());
- EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_.items()[1].type);
+ EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_.items()[kExpectedAppIndex].type);
EXPECT_FALSE(launcher_controller.IsAppPinned(extension1_->id()));
EXPECT_FALSE(launcher_controller.IsAppPinned(extension2_->id()));
EXPECT_TRUE(launcher_controller.IsAppPinned(extension3_->id()));
@@ -147,7 +151,7 @@ TEST_F(ChromeLauncherControllerTest, Policy) {
ChromeLauncherController launcher_controller(profile_.get(), &model_);
launcher_controller.Init();
EXPECT_EQ(3, model_.item_count());
- EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_.items()[1].type);
+ EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_.items()[kExpectedAppIndex].type);
EXPECT_TRUE(launcher_controller.IsAppPinned(extension1_->id()));
EXPECT_FALSE(launcher_controller.IsAppPinned(extension2_->id()));
EXPECT_FALSE(launcher_controller.IsAppPinned(extension3_->id()));
@@ -155,7 +159,7 @@ TEST_F(ChromeLauncherControllerTest, Policy) {
// Installing |extension2_| should add it to the launcher.
extension_service_->AddExtension(extension2_.get());
EXPECT_EQ(4, model_.item_count());
- EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_.items()[1].type);
+ EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_.items()[kExpectedAppIndex].type);
EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_.items()[2].type);
EXPECT_TRUE(launcher_controller.IsAppPinned(extension1_->id()));
EXPECT_TRUE(launcher_controller.IsAppPinned(extension2_->id()));
@@ -166,7 +170,7 @@ TEST_F(ChromeLauncherControllerTest, Policy) {
profile_->GetTestingPrefService()->SetManagedPref(prefs::kPinnedLauncherApps,
policy_value.DeepCopy());
EXPECT_EQ(3, model_.item_count());
- EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_.items()[1].type);
+ EXPECT_EQ(ash::TYPE_APP_SHORTCUT, model_.items()[kExpectedAppIndex].type);
EXPECT_FALSE(launcher_controller.IsAppPinned(extension1_->id()));
EXPECT_TRUE(launcher_controller.IsAppPinned(extension2_->id()));
EXPECT_FALSE(launcher_controller.IsAppPinned(extension3_->id()));
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698