| 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 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | |
| 8 #include "chrome/browser/ui/cocoa/confirm_quit.h" | 7 #include "chrome/browser/ui/cocoa/confirm_quit.h" |
| 8 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" |
| 9 #include "testing/gtest_mac.h" | 9 #include "testing/gtest_mac.h" |
| 10 #include "ui/base/accelerators/platform_accelerator_cocoa.h" | 10 #include "ui/base/accelerators/platform_accelerator_cocoa.h" |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 class ConfirmQuitPanelControllerTest : public CocoaTest { | 14 class ConfirmQuitPanelControllerTest : public CocoaTest { |
| 15 public: | 15 public: |
| 16 NSString* TestString(NSString* str) { | 16 NSString* TestString(NSString* str) { |
| 17 str = [str stringByReplacingOccurrencesOfString:@"{Cmd}" | 17 str = [str stringByReplacingOccurrencesOfString:@"{Cmd}" |
| 18 withString:@"\u2318"]; | 18 withString:@"\u2318"]; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 EXPECT_NSEQ(TestString(@"{Ctrl}{Shift}M"), | 70 EXPECT_NSEQ(TestString(@"{Ctrl}{Shift}M"), |
| 71 [controller keyCombinationForAccelerator:item6]); | 71 [controller keyCombinationForAccelerator:item6]); |
| 72 | 72 |
| 73 ui::PlatformAcceleratorCocoa item7( | 73 ui::PlatformAcceleratorCocoa item7( |
| 74 @"e", NSCommandKeyMask | NSAlternateKeyMask); | 74 @"e", NSCommandKeyMask | NSAlternateKeyMask); |
| 75 EXPECT_NSEQ(TestString(@"{Cmd}{Opt}E"), | 75 EXPECT_NSEQ(TestString(@"{Cmd}{Opt}E"), |
| 76 [controller keyCombinationForAccelerator:item7]); | 76 [controller keyCombinationForAccelerator:item7]); |
| 77 } | 77 } |
| 78 | 78 |
| 79 } // namespace | 79 } // namespace |
| OLD | NEW |