OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import <Cocoa/Cocoa.h> |
| 6 |
| 7 #include "chrome/app/chrome_dll_resource.h" |
| 8 #import "chrome/browser/app_controller_mac.h" |
| 9 #include "testing/platform_test.h" |
| 10 |
| 11 class AppControllerTest : public PlatformTest { |
| 12 }; |
| 13 |
| 14 TEST_F(AppControllerTest, DockMenu) { |
| 15 AppController* ac = [[AppController alloc] init]; |
| 16 NSMenu* menu = [ac applicationDockMenu:NSApp]; |
| 17 NSMenuItem* item; |
| 18 |
| 19 EXPECT_TRUE(menu); |
| 20 EXPECT_NE(-1, [menu indexOfItemWithTag:IDC_NEW_WINDOW]); |
| 21 EXPECT_NE(-1, [menu indexOfItemWithTag:IDC_NEW_INCOGNITO_WINDOW]); |
| 22 for (item in [menu itemArray]) { |
| 23 EXPECT_EQ(ac, [item target]); |
| 24 EXPECT_EQ(@selector(commandDispatch:), [item action]); |
| 25 } |
| 26 } |
OLD | NEW |