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 2815882a50d8e3f99e0bec78196d674daa0ab5f5..a01524644e11618c51b954740191ef7d1cb5c431 100644 |
--- a/ui/app_list/cocoa/apps_grid_controller_unittest.mm |
+++ b/ui/app_list/cocoa/apps_grid_controller_unittest.mm |
@@ -983,6 +983,13 @@ TEST_F(AppsGridControllerTest, ContextMenus) { |
menu = [page menuForEvent:mouse_at_cell_1]; |
EXPECT_EQ(1, [menu numberOfItems]); |
EXPECT_NSEQ(@"Menu For: Item Two", [[menu itemAtIndex:0] title]); |
+ |
+ // Test that a button being held down with the left button does not also show |
+ // a context menu. |
+ [GetItemViewAt(0) highlight:YES]; |
+ EXPECT_FALSE([page menuForEvent:mouse_at_cell_0]); |
+ [GetItemViewAt(0) highlight:NO]; |
+ EXPECT_TRUE([page menuForEvent:mouse_at_cell_0]); |
} |
} // namespace test |