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

Unified Diff: ui/app_list/cocoa/apps_grid_controller_unittest.mm

Issue 23709003: Display an app's short name in the app launcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed compilation errors in app list unit tests on mac 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
« no previous file with comments | « ui/app_list/app_list_item_model.cc ('k') | ui/app_list/test/app_list_test_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/cocoa/apps_grid_controller_unittest.mm
diff --git a/ui/app_list/cocoa/apps_grid_controller_unittest.mm b/ui/app_list/cocoa/apps_grid_controller_unittest.mm
index 2ee16515b359bc9f16e255ac4c122976dad97b12..d4f73d68196f38be7223a5186457ab25584998fd 100644
--- a/ui/app_list/cocoa/apps_grid_controller_unittest.mm
+++ b/ui/app_list/cocoa/apps_grid_controller_unittest.mm
@@ -125,7 +125,7 @@ class AppListItemWithMenu : public AppListItemModel {
AppListItemWithMenu(const std::string& title)
: menu_model_(NULL),
menu_ready_(true) {
- SetTitle(title);
+ SetTitleAndFullName(title, title);
menu_model_.AddItem(0, UTF8ToUTF16("Menu For: " + title));
}
@@ -434,7 +434,7 @@ TEST_F(AppsGridControllerTest, ModelUpdates) {
// Update the title via the ItemModelObserver.
app_list::AppListItemModel* item_model = model()->apps()->GetItemAt(2);
- item_model->SetTitle("UpdatedItem");
+ item_model->SetTitleAndFullName("UpdatedItem", "UpdatedItem");
EXPECT_NSEQ(@"UpdatedItem", [button title]);
EXPECT_EQ(std::string("|Item 0,Item 1,UpdatedItem|"), GetViewContent());
@@ -467,7 +467,7 @@ TEST_F(AppsGridControllerTest, ModelUpdates) {
EXPECT_EQ(std::string("|Item 0,Item 2|"), GetViewContent());
// Test inserting in the middle.
- model()->apps()->AddAt(1, model()->CreateItem("Item One"));
+ model()->apps()->AddAt(1, model()->CreateItem("Item One", "Item One"));
EXPECT_EQ(3u, [apps_grid_controller_ itemCount]);
EXPECT_EQ(std::string("|Item 0,Item One,Item 2|"), GetViewContent());
« no previous file with comments | « ui/app_list/app_list_item_model.cc ('k') | ui/app_list/test/app_list_test_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698