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

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

Issue 25859005: Elim ActivateAppListItem, ChromeAppListItem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile fixes Created 7 years, 2 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/cocoa/apps_grid_controller.mm ('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 d4f73d68196f38be7223a5186457ab25584998fd..0138632f6f8dce19fd351c354032999f5499706b 100644
--- a/ui/app_list/cocoa/apps_grid_controller_unittest.mm
+++ b/ui/app_list/cocoa/apps_grid_controller_unittest.mm
@@ -209,8 +209,9 @@ TEST_F(AppsGridControllerTest, DISABLED_SingleEntryModel) {
// Launch the item.
SimulateClick(subview);
SinkEvents();
- EXPECT_EQ(1, delegate()->activate_count());
- EXPECT_EQ(std::string("Item 0"), delegate()->last_activated()->title());
+ EXPECT_EQ(1, model()->activate_count());
+ ASSERT_TRUE(model()->last_activated());
+ EXPECT_EQ(std::string("Item 0"), model()->last_activated()->title());
}
// Test activating an item on the second page (the 17th item).
@@ -227,8 +228,9 @@ TEST_F(AppsGridControllerTest, DISABLED_TwoPageModel) {
// Launch the item.
SimulateClick(subview);
SinkEvents();
- EXPECT_EQ(1, delegate()->activate_count());
- EXPECT_EQ(std::string("Item 16"), delegate()->last_activated()->title());
+ EXPECT_EQ(1, model()->activate_count());
+ ASSERT_TRUE(model()->last_activated());
+ EXPECT_EQ(std::string("Item 16"), model()->last_activated()->title());
}
// Test setModel.
@@ -315,8 +317,9 @@ TEST_F(AppsGridControllerTest, FirstPageKeyboardNavigation) {
SimulateKeyAction(@selector(moveRight:));
EXPECT_EQ(2u, [apps_grid_controller_ selectedItemIndex]);
SimulateKeyAction(@selector(insertNewline:));
- EXPECT_EQ(1, delegate()->activate_count());
- EXPECT_EQ(std::string("Item 2"), delegate()->last_activated()->title());
+ EXPECT_EQ(1, model()->activate_count());
+ ASSERT_TRUE(model()->last_activated());
+ EXPECT_EQ(std::string("Item 2"), model()->last_activated()->title());
}
// Tests keyboard navigation across pages.
« no previous file with comments | « ui/app_list/cocoa/apps_grid_controller.mm ('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