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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/toolbar_button_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 4
5 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "base/mac/scoped_nsobject.h" 7 #import "base/mac/scoped_nsobject.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 9 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h"
10 #import "chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.h" 10 #import "chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.h"
11 #import "testing/gtest_mac.h" 11 #import "testing/gtest_mac.h"
12 #import "ui/events/test/cocoa_test_event_utils.h" 12 #import "ui/events/test/cocoa_test_event_utils.h"
13 13
14 @interface TestableToolbarButton : ToolbarButton { 14 @interface TestableToolbarButton : ToolbarButton {
15 @private 15 @private
16 NSInteger numOfClick_; 16 NSInteger numOfClick_;
17 NSInteger lastCommand_; 17 NSInteger lastCommand_;
18 } 18 }
19 19
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 [NSApp postEvent:left_up_in_view atStart:YES]; 303 [NSApp postEvent:left_up_in_view atStart:YES];
304 [NSApp postEvent:left_down_in_view atStart:YES]; 304 [NSApp postEvent:left_down_in_view atStart:YES];
305 [button_ otherMouseDown:other_down_in_view]; 305 [button_ otherMouseDown:other_down_in_view];
306 306
307 EXPECT_EQ(NSOffState, [button_ state]); 307 EXPECT_EQ(NSOffState, [button_ state]);
308 EXPECT_EQ(1, [button_ numOfClick]); 308 EXPECT_EQ(1, [button_ numOfClick]);
309 EXPECT_EQ(IDC_HOME, [button_ lastCommand]); 309 EXPECT_EQ(IDC_HOME, [button_ lastCommand]);
310 } 310 }
311 311
312 } // namespace 312 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698