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

Side by Side Diff: chrome/browser/app_controller_mac_unittest.mm

Issue 256054: Explicitly activeIgnoringOtherApps from IDC_NEW{,_INCOGNITO}_WINDOW... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/scoped_nsobject.h" 7 #include "base/scoped_nsobject.h"
8 #include "chrome/app/chrome_dll_resource.h" 8 #include "chrome/app/chrome_dll_resource.h"
9 #import "chrome/browser/app_controller_mac.h" 9 #import "chrome/browser/app_controller_mac.h"
10 #include "testing/platform_test.h" 10 #include "testing/platform_test.h"
11 11
12 class AppControllerTest : public PlatformTest { 12 class AppControllerTest : public PlatformTest {
13 }; 13 };
14 14
15 TEST_F(AppControllerTest, DockMenu) { 15 TEST_F(AppControllerTest, DockMenu) {
16 scoped_nsobject<AppController> ac([[AppController alloc] init]); 16 scoped_nsobject<AppController> ac([[AppController alloc] init]);
17 NSMenu* menu = [ac applicationDockMenu:NSApp]; 17 NSMenu* menu = [ac applicationDockMenu:NSApp];
18 NSMenuItem* item; 18 NSMenuItem* item;
19 19
20 EXPECT_TRUE(menu); 20 EXPECT_TRUE(menu);
21 EXPECT_NE(-1, [menu indexOfItemWithTag:IDC_NEW_WINDOW]); 21 EXPECT_NE(-1, [menu indexOfItemWithTag:IDC_NEW_WINDOW]);
22 EXPECT_NE(-1, [menu indexOfItemWithTag:IDC_NEW_INCOGNITO_WINDOW]); 22 EXPECT_NE(-1, [menu indexOfItemWithTag:IDC_NEW_INCOGNITO_WINDOW]);
23 for (item in [menu itemArray]) { 23 for (item in [menu itemArray]) {
24 EXPECT_EQ(ac.get(), [item target]); 24 EXPECT_EQ(ac.get(), [item target]);
25 EXPECT_EQ(@selector(commandDispatch:), [item action]); 25 EXPECT_EQ(@selector(newWindowFromDock:), [item action]);
26 } 26 }
27 } 27 }
OLDNEW
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698