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

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

Issue 22793011: ash:Shelf - Enable Alternate Shelf and Side Shelf by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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: chrome/browser/ui/ash/launcher/browser_launcher_item_controller_unittest.cc
diff --git a/chrome/browser/ui/ash/launcher/browser_launcher_item_controller_unittest.cc b/chrome/browser/ui/ash/launcher/browser_launcher_item_controller_unittest.cc
index 0f20bc2d49d912ce789dbe736538fc186649e428..1d163a86d6d78082d5ce4933a043af884b964ae2 100644
--- a/chrome/browser/ui/ash/launcher/browser_launcher_item_controller_unittest.cc
+++ b/chrome/browser/ui/ash/launcher/browser_launcher_item_controller_unittest.cc
@@ -240,9 +240,9 @@ class LauncherItemControllerPerAppTest
// Verify that the launcher item positions are persisted and restored.
TEST_F(LauncherItemControllerPerAppTest, PersistLauncherItemPositions) {
- EXPECT_EQ(ash::TYPE_BROWSER_SHORTCUT,
- launcher_model_->items()[0].type);
EXPECT_EQ(ash::TYPE_APP_LIST,
+ launcher_model_->items()[0].type);
+ EXPECT_EQ(ash::TYPE_BROWSER_SHORTCUT,
launcher_model_->items()[1].type);
scoped_ptr<content::WebContents> tab1(CreateTestWebContents());
scoped_ptr<content::WebContents> tab2(CreateTestWebContents());
@@ -254,23 +254,23 @@ TEST_F(LauncherItemControllerPerAppTest, PersistLauncherItemPositions) {
EXPECT_TRUE(launcher_delegate_->IsAppPinned("1"));
launcher_delegate_->PinAppWithID("2");
- EXPECT_EQ(ash::TYPE_BROWSER_SHORTCUT,
+ EXPECT_EQ(ash::TYPE_APP_LIST,
launcher_model_->items()[0].type);
- EXPECT_EQ(ash::TYPE_APP_SHORTCUT,
+ EXPECT_EQ(ash::TYPE_BROWSER_SHORTCUT,
launcher_model_->items()[1].type);
EXPECT_EQ(ash::TYPE_APP_SHORTCUT,
launcher_model_->items()[2].type);
- EXPECT_EQ(ash::TYPE_APP_LIST,
+ EXPECT_EQ(ash::TYPE_APP_SHORTCUT,
launcher_model_->items()[3].type);
- launcher_model_->Move(0, 2);
- EXPECT_EQ(ash::TYPE_APP_SHORTCUT,
+ launcher_model_->Move(1, 3);
+ EXPECT_EQ(ash::TYPE_APP_LIST,
launcher_model_->items()[0].type);
EXPECT_EQ(ash::TYPE_APP_SHORTCUT,
launcher_model_->items()[1].type);
- EXPECT_EQ(ash::TYPE_BROWSER_SHORTCUT,
+ EXPECT_EQ(ash::TYPE_APP_SHORTCUT,
launcher_model_->items()[2].type);
- EXPECT_EQ(ash::TYPE_APP_LIST,
+ EXPECT_EQ(ash::TYPE_BROWSER_SHORTCUT,
launcher_model_->items()[3].type);
launcher_delegate_.reset();
@@ -285,13 +285,13 @@ TEST_F(LauncherItemControllerPerAppTest, PersistLauncherItemPositions) {
launcher_delegate_->Init();
- EXPECT_EQ(ash::TYPE_APP_SHORTCUT,
+ EXPECT_EQ(ash::TYPE_APP_LIST,
launcher_model_->items()[0].type);
EXPECT_EQ(ash::TYPE_APP_SHORTCUT,
launcher_model_->items()[1].type);
- EXPECT_EQ(ash::TYPE_BROWSER_SHORTCUT,
+ EXPECT_EQ(ash::TYPE_APP_SHORTCUT,
launcher_model_->items()[2].type);
- EXPECT_EQ(ash::TYPE_APP_LIST,
+ EXPECT_EQ(ash::TYPE_BROWSER_SHORTCUT,
launcher_model_->items()[3].type);
}
@@ -397,13 +397,13 @@ TEST_F(BrowserLauncherItemControllerTest, PersistPinned) {
// Verify that launcher item positions are persisted and restored.
TEST_F(BrowserLauncherItemControllerTest,
PersistLauncherItemPositionsPerBrowser) {
- int browser_shortcut_index = 0;
- int app_list_index = 1;
+ int app_list_index = 0;
+ int browser_shortcut_index = 1;
- EXPECT_EQ(ash::TYPE_BROWSER_SHORTCUT,
- launcher_model_->items()[browser_shortcut_index].type);
EXPECT_EQ(ash::TYPE_APP_LIST,
launcher_model_->items()[app_list_index].type);
+ EXPECT_EQ(ash::TYPE_BROWSER_SHORTCUT,
+ launcher_model_->items()[browser_shortcut_index].type);
scoped_ptr<content::WebContents> tab1(CreateTestWebContents());
scoped_ptr<content::WebContents> tab2(CreateTestWebContents());
@@ -422,8 +422,7 @@ TEST_F(BrowserLauncherItemControllerTest,
launcher_model_->Move(browser_shortcut_index, app1_index);
- browser_shortcut_index = 1;
- app1_index = 0;
+ std::swap(browser_shortcut_index, app1_index);
EXPECT_GT(app_icon_loader_->GetAndClearFetchCount(), 0);
EXPECT_EQ(ash::TYPE_APP_SHORTCUT,

Powered by Google App Engine
This is Rietveld 408576698