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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/wrench_toolbar_button_cell_unittest.mm

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol Created 7 years, 6 months 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/toolbar/wrench_toolbar_button_cell.h" 5 #import "chrome/browser/ui/cocoa/toolbar/wrench_toolbar_button_cell.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
9 9
10 @interface TestWrenchToolbarButton : NSButton 10 @interface TestWrenchToolbarButton : NSButton
11 @end 11 @end
12 12
13 @implementation TestWrenchToolbarButton 13 @implementation TestWrenchToolbarButton
14 14
15 + (Class)cellClass { 15 + (Class)cellClass {
16 return [WrenchToolbarButtonCell class]; 16 return [WrenchToolbarButtonCell class];
17 } 17 }
18 18
19 @end 19 @end
20 20
21 class WrenchToolbarButtonCellTest : public CocoaTest { 21 class WrenchToolbarButtonCellTest : public CocoaTest {
22 protected: 22 protected:
23 WrenchToolbarButtonCellTest() { 23 WrenchToolbarButtonCellTest() {
24 scoped_nsobject<NSButton> button([[TestWrenchToolbarButton alloc] 24 base::scoped_nsobject<NSButton> button([[TestWrenchToolbarButton alloc]
25 initWithFrame:NSMakeRect(0, 0, 29, 29)]); 25 initWithFrame:NSMakeRect(0, 0, 29, 29)]);
26 button_ = button; 26 button_ = button;
27 [[test_window() contentView] addSubview:button_]; 27 [[test_window() contentView] addSubview:button_];
28 } 28 }
29 29
30 NSButton* button_; 30 NSButton* button_;
31 scoped_nsobject<WrenchToolbarButtonCell> cell_; 31 base::scoped_nsobject<WrenchToolbarButtonCell> cell_;
32 base::MessageLoopForUI message_loop_; // Needed for ui::Animation. 32 base::MessageLoopForUI message_loop_; // Needed for ui::Animation.
33 33
34 private: 34 private:
35 DISALLOW_COPY_AND_ASSIGN(WrenchToolbarButtonCellTest); 35 DISALLOW_COPY_AND_ASSIGN(WrenchToolbarButtonCellTest);
36 }; 36 };
37 37
38 TEST_VIEW(WrenchToolbarButtonCellTest, button_) 38 TEST_VIEW(WrenchToolbarButtonCellTest, button_)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698