| Index: chrome/browser/ui/cocoa/panels/panel_cocoa_unittest.mm
|
| diff --git a/chrome/browser/ui/cocoa/panels/panel_cocoa_unittest.mm b/chrome/browser/ui/cocoa/panels/panel_cocoa_unittest.mm
|
| index a11e498b966391f55663de8bd5d1701009f01cd4..1e3f17fe9334727b7e65814ce954b9970f6a38de 100644
|
| --- a/chrome/browser/ui/cocoa/panels/panel_cocoa_unittest.mm
|
| +++ b/chrome/browser/ui/cocoa/panels/panel_cocoa_unittest.mm
|
| @@ -308,6 +308,7 @@ TEST_F(PanelCocoaTest, MenuItems) {
|
| NSMenuItem* fullscreen_menu_item = CreateMenuItem(menu, IDC_FULLSCREEN);
|
| NSMenuItem* presentation_menu_item =
|
| CreateMenuItem(menu, IDC_PRESENTATION_MODE);
|
| + NSMenuItem* sync_menu_item = CreateMenuItem(menu, IDC_SHOW_SYNC_SETUP);
|
| NSMenuItem* dev_tools_item = CreateMenuItem(menu, IDC_DEV_TOOLS);
|
| NSMenuItem* dev_tools_console_item =
|
| CreateMenuItem(menu, IDC_DEV_TOOLS_CONSOLE);
|
| @@ -326,6 +327,7 @@ TEST_F(PanelCocoaTest, MenuItems) {
|
| EXPECT_FALSE([find_next_menu_item isEnabled]);
|
| EXPECT_FALSE([fullscreen_menu_item isEnabled]);
|
| EXPECT_FALSE([presentation_menu_item isEnabled]);
|
| + EXPECT_FALSE([sync_menu_item isEnabled]);
|
| // These are not enabled by Panel, so they are expected to be disabled for
|
| // this unit_test. In real Chrome app, they are enabled by Chrome NSApp
|
| // controller. PanelCocoaBrowsertest.MenuItems verifies that.
|
| @@ -336,6 +338,11 @@ TEST_F(PanelCocoaTest, MenuItems) {
|
| EXPECT_TRUE([dev_tools_item isEnabled]);
|
| EXPECT_TRUE([dev_tools_console_item isEnabled]);
|
|
|
| + // Verify that commandDispatch on an invalid menu item does not crash.
|
| + [NSApp sendAction:[sync_menu_item action]
|
| + to:[sync_menu_item target]
|
| + from:sync_menu_item];
|
| +
|
| ClosePanelAndWait(panel);
|
| }
|
|
|
|
|