OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/confirm_quit_panel_controller.h" | 5 #import "chrome/browser/ui/cocoa/confirm_quit_panel_controller.h" |
6 | 6 |
7 #include "base/memory/scoped_nsobject.h" | 7 #include "base/mac/scoped_nsobject.h" |
8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
9 #include "chrome/browser/ui/cocoa/confirm_quit.h" | 9 #include "chrome/browser/ui/cocoa/confirm_quit.h" |
10 #include "testing/gtest_mac.h" | 10 #include "testing/gtest_mac.h" |
11 #include "ui/base/accelerators/platform_accelerator_cocoa.h" | 11 #include "ui/base/accelerators/platform_accelerator_cocoa.h" |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 class ConfirmQuitPanelControllerTest : public CocoaTest { | 15 class ConfirmQuitPanelControllerTest : public CocoaTest { |
16 public: | 16 public: |
17 NSString* TestString(NSString* str) { | 17 NSString* TestString(NSString* str) { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 EXPECT_NSEQ(TestString(@"{Ctrl}{Shift}M"), | 71 EXPECT_NSEQ(TestString(@"{Ctrl}{Shift}M"), |
72 [controller keyCombinationForAccelerator:item6]); | 72 [controller keyCombinationForAccelerator:item6]); |
73 | 73 |
74 ui::PlatformAcceleratorCocoa item7( | 74 ui::PlatformAcceleratorCocoa item7( |
75 @"e", NSCommandKeyMask | NSAlternateKeyMask); | 75 @"e", NSCommandKeyMask | NSAlternateKeyMask); |
76 EXPECT_NSEQ(TestString(@"{Cmd}{Opt}E"), | 76 EXPECT_NSEQ(TestString(@"{Cmd}{Opt}E"), |
77 [controller keyCombinationForAccelerator:item7]); | 77 [controller keyCombinationForAccelerator:item7]); |
78 } | 78 } |
79 | 79 |
80 } // namespace | 80 } // namespace |
OLD | NEW |