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

Side by Side Diff: chrome/browser/ui/cocoa/confirm_quit_panel_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 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 #include "base/memory/scoped_nsobject.h" 5 #include "base/memory/scoped_nsobject.h"
6 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 6 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
7 #include "chrome/browser/ui/cocoa/confirm_quit_panel_controller.h" 7 #include "chrome/browser/ui/cocoa/confirm_quit_panel_controller.h"
8 #include "testing/gtest_mac.h" 8 #include "testing/gtest_mac.h"
9 #include "ui/base/models/accelerator_cocoa.h" 9 #include "ui/base/accelerators/accelerator_cocoa.h"
10 10
11 namespace { 11 namespace {
12 12
13 class ConfirmQuitPanelControllerTest : public CocoaTest { 13 class ConfirmQuitPanelControllerTest : public CocoaTest {
14 public: 14 public:
15 NSString* TestString(NSString* str) { 15 NSString* TestString(NSString* str) {
16 str = [str stringByReplacingOccurrencesOfString:@"{Cmd}" 16 str = [str stringByReplacingOccurrencesOfString:@"{Cmd}"
17 withString:@"\u2318"]; 17 withString:@"\u2318"];
18 str = [str stringByReplacingOccurrencesOfString:@"{Ctrl}" 18 str = [str stringByReplacingOccurrencesOfString:@"{Ctrl}"
19 withString:@"\u2303"]; 19 withString:@"\u2303"];
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 item = ui::AcceleratorCocoa(@"m", NSShiftKeyMask | NSControlKeyMask); 68 item = ui::AcceleratorCocoa(@"m", NSShiftKeyMask | NSControlKeyMask);
69 EXPECT_NSEQ(TestString(@"{Ctrl}{Shift}M"), 69 EXPECT_NSEQ(TestString(@"{Ctrl}{Shift}M"),
70 [controller keyCombinationForAccelerator:item]); 70 [controller keyCombinationForAccelerator:item]);
71 71
72 item = ui::AcceleratorCocoa(@"e", NSCommandKeyMask | NSAlternateKeyMask); 72 item = ui::AcceleratorCocoa(@"e", NSCommandKeyMask | NSAlternateKeyMask);
73 EXPECT_NSEQ(TestString(@"{Cmd}{Opt}E"), 73 EXPECT_NSEQ(TestString(@"{Cmd}{Opt}E"),
74 [controller keyCombinationForAccelerator:item]); 74 [controller keyCombinationForAccelerator:item]);
75 } 75 }
76 76
77 } // namespace 77 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/confirm_quit_panel_controller.h ('k') | chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698