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

Side by Side Diff: chrome/browser/ui/cocoa/accelerators_cocoa_browsertest.mm

Issue 1133713009: Subject .mm files to the header sorting presubmit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase - of course... it would be one of my patches I conflict with :| Created 5 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/logging.h" 7 #include "base/logging.h"
8 #import "chrome/browser/ui/cocoa/accelerators_cocoa.h" 8 #import "chrome/browser/ui/cocoa/accelerators_cocoa.h"
9 #include "chrome/test/base/in_process_browser_test.h" 9 #include "chrome/test/base/in_process_browser_test.h"
10 #include "testing/gtest_mac.h"
10 #include "ui/base/accelerators/platform_accelerator_cocoa.h" 11 #include "ui/base/accelerators/platform_accelerator_cocoa.h"
11 #import "ui/events/keycodes/keyboard_code_conversion_mac.h" 12 #import "ui/events/keycodes/keyboard_code_conversion_mac.h"
12 #include "testing/gtest_mac.h"
13 13
14 typedef InProcessBrowserTest AcceleratorsCocoaBrowserTest; 14 typedef InProcessBrowserTest AcceleratorsCocoaBrowserTest;
15 15
16 namespace { 16 namespace {
17 17
18 // Adds all NSMenuItems with an accelerator to the array. 18 // Adds all NSMenuItems with an accelerator to the array.
19 void AddAcceleratorItemsToArray(NSMenu* menu, NSMutableArray* array) { 19 void AddAcceleratorItemsToArray(NSMenu* menu, NSMutableArray* array) {
20 for (NSMenuItem* item in [menu itemArray]) { 20 for (NSMenuItem* item in [menu itemArray]) {
21 NSMenu* submenu = item.submenu; 21 NSMenu* submenu = item.submenu;
22 if (submenu) 22 if (submenu)
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 MenuContainsAccelerator([NSApp mainMenu], 124 MenuContainsAccelerator([NSApp mainMenu],
125 platform_accelerator->characters(), 125 platform_accelerator->characters(),
126 platform_accelerator->modifier_mask()); 126 platform_accelerator->modifier_mask());
127 EXPECT_TRUE(item); 127 EXPECT_TRUE(item);
128 128
129 // If the menu uses a commandDispatch:, the tag must match the command id! 129 // If the menu uses a commandDispatch:, the tag must match the command id!
130 if (item.action == @selector(commandDispatch:)) 130 if (item.action == @selector(commandDispatch:))
131 EXPECT_EQ(item.tag, it->first); 131 EXPECT_EQ(item.tag, it->first);
132 } 132 }
133 } 133 }
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_service_mac.mm ('k') | chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698