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

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

Issue 8695005: Move accelerator related files to ui/base/accelerators (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h"
6 6
7 #include "base/mac/mac_util.h" 7 #include "base/mac/mac_util.h"
8 #include "chrome/browser/tabs/tab_strip_model.h"
8 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_window.h" 10 #include "chrome/browser/ui/browser_window.h"
10 #include "chrome/browser/ui/cocoa/browser_window_controller.h" 11 #include "chrome/browser/ui/cocoa/browser_window_controller.h"
11 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" 12 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
12 #include "chrome/browser/tabs/tab_strip_model.h"
13 #include "chrome/common/chrome_notification_types.h" 13 #include "chrome/common/chrome_notification_types.h"
14 #include "chrome/test/base/ui_test_utils.h" 14 #include "chrome/test/base/ui_test_utils.h"
15 #include "content/browser/site_instance.h" 15 #include "content/browser/site_instance.h"
16 #include "testing/gtest_mac.h" 16 #include "testing/gtest_mac.h"
17 #include "ui/base/models/accelerator_cocoa.h" 17 #include "ui/base/accelerators/accelerator_cocoa.h"
18 18
19 @interface FullscreenExitBubbleController(JustForTesting) 19 @interface FullscreenExitBubbleController(JustForTesting)
20 // Already defined. 20 // Already defined.
21 + (NSString*)keyCommandString; 21 + (NSString*)keyCommandString;
22 + (NSString*)keyCombinationForAccelerator:(const ui::AcceleratorCocoa&)item; 22 + (NSString*)keyCombinationForAccelerator:(const ui::AcceleratorCocoa&)item;
23 @end 23 @end
24 24
25 @interface FullscreenExitBubbleController(ExposedForTesting) 25 @interface FullscreenExitBubbleController(ExposedForTesting)
26 - (NSTextField*)exitLabelPlaceholder; 26 - (NSTextField*)exitLabelPlaceholder;
27 - (NSTextView*)exitLabel; 27 - (NSTextView*)exitLabel;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 TEST_F(FullscreenExitBubbleControllerTest, ShortcutText) { 112 TEST_F(FullscreenExitBubbleControllerTest, ShortcutText) {
113 ui::AcceleratorCocoa cmd_F(@"F", NSCommandKeyMask); 113 ui::AcceleratorCocoa cmd_F(@"F", NSCommandKeyMask);
114 ui::AcceleratorCocoa cmd_shift_f(@"f", NSCommandKeyMask|NSShiftKeyMask); 114 ui::AcceleratorCocoa cmd_shift_f(@"f", NSCommandKeyMask|NSShiftKeyMask);
115 NSString* cmd_F_text = [FullscreenExitBubbleController 115 NSString* cmd_F_text = [FullscreenExitBubbleController
116 keyCombinationForAccelerator:cmd_F]; 116 keyCombinationForAccelerator:cmd_F];
117 NSString* cmd_shift_f_text = [FullscreenExitBubbleController 117 NSString* cmd_shift_f_text = [FullscreenExitBubbleController
118 keyCombinationForAccelerator:cmd_shift_f]; 118 keyCombinationForAccelerator:cmd_shift_f];
119 EXPECT_NSEQ(cmd_shift_f_text, cmd_F_text); 119 EXPECT_NSEQ(cmd_shift_f_text, cmd_F_text);
120 EXPECT_NSEQ(@"\u2318\u21E7F", cmd_shift_f_text); 120 EXPECT_NSEQ(@"\u2318\u21E7F", cmd_shift_f_text);
121 } 121 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.mm ('k') | chrome/browser/ui/cocoa/menu_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698