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

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

Issue 2565813002: Create c/b/ui/cocoa/test and move test files to there (Closed)
Patch Set: Rebase Created 4 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
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 #include <Carbon/Carbon.h> 4 #include <Carbon/Carbon.h>
5 5
6 #include "base/debug/debugger.h" 6 #include "base/debug/debugger.h"
7 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" 9 #import "chrome/browser/ui/cocoa/base_bubble_controller.h"
10 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h"
11 #include "chrome/browser/ui/cocoa/info_bubble_window.h" 10 #include "chrome/browser/ui/cocoa/info_bubble_window.h"
12 #include "chrome/browser/ui/cocoa/run_loop_testing.h" 11 #include "chrome/browser/ui/cocoa/test/cocoa_test_helper.h"
12 #include "chrome/browser/ui/cocoa/test/run_loop_testing.h"
13 #include "ui/events/test/cocoa_test_event_utils.h" 13 #include "ui/events/test/cocoa_test_event_utils.h"
14 14
15 // Mock BaseBubbleController to pick up -cancel:, but don't call the designated 15 // Mock BaseBubbleController to pick up -cancel:, but don't call the designated
16 // initializer in order to test just InfoBubbleWindow. 16 // initializer in order to test just InfoBubbleWindow.
17 @interface InfoBubbleWindowController : BaseBubbleController 17 @interface InfoBubbleWindowController : BaseBubbleController
18 @end 18 @end
19 19
20 @implementation InfoBubbleWindowController 20 @implementation InfoBubbleWindowController
21 - (IBAction)cancel:(id)sender { 21 - (IBAction)cancel:(id)sender {
22 [self close]; 22 [self close];
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 TEST_F(InfoBubbleWindowTest, CommandPeriodCloses) { 72 TEST_F(InfoBubbleWindowTest, CommandPeriodCloses) {
73 [controller_ showWindow:nil]; 73 [controller_ showWindow:nil];
74 EXPECT_TRUE([window_ isVisible]); 74 EXPECT_TRUE([window_ isVisible]);
75 75
76 [window_ performKeyEquivalent:cocoa_test_event_utils::KeyEventWithKeyCode( 76 [window_ performKeyEquivalent:cocoa_test_event_utils::KeyEventWithKeyCode(
77 kVK_ANSI_Period, '.', NSKeyDown, 77 kVK_ANSI_Period, '.', NSKeyDown,
78 NSCommandKeyMask)]; 78 NSCommandKeyMask)];
79 EXPECT_FALSE([window_ isVisible]); 79 EXPECT_FALSE([window_ isVisible]);
80 } 80 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698