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

Side by Side Diff: chrome/browser/ui/cocoa/hover_close_button_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, 5 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) 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.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 #import "chrome/browser/ui/cocoa/hover_close_button.h" 9 #import "chrome/browser/ui/cocoa/hover_close_button.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 class HoverCloseButtonTest : public CocoaTest { 12 class HoverCloseButtonTest : public CocoaTest {
13 public: 13 public:
14 HoverCloseButtonTest() { 14 HoverCloseButtonTest() {
15 NSRect content_frame = [[test_window() contentView] frame]; 15 NSRect content_frame = [[test_window() contentView] frame];
16 button_.reset([[HoverCloseButton alloc] initWithFrame:content_frame]); 16 button_.reset([[HoverCloseButton alloc] initWithFrame:content_frame]);
17 [[test_window() contentView] addSubview:button_]; 17 [[test_window() contentView] addSubview:button_];
18 } 18 }
19 19
20 protected: 20 protected:
21 scoped_nsobject<HoverCloseButton> button_; 21 base::scoped_nsobject<HoverCloseButton> button_;
22 }; 22 };
23 23
24 class WebUIHoverCloseButtonTest : public CocoaTest { 24 class WebUIHoverCloseButtonTest : public CocoaTest {
25 public: 25 public:
26 WebUIHoverCloseButtonTest() { 26 WebUIHoverCloseButtonTest() {
27 NSRect content_frame = [[test_window() contentView] frame]; 27 NSRect content_frame = [[test_window() contentView] frame];
28 button_.reset([[WebUIHoverCloseButton alloc] initWithFrame:content_frame]); 28 button_.reset([[WebUIHoverCloseButton alloc] initWithFrame:content_frame]);
29 [[test_window() contentView] addSubview:button_]; 29 [[test_window() contentView] addSubview:button_];
30 } 30 }
31 31
32 protected: 32 protected:
33 scoped_nsobject<WebUIHoverCloseButton> button_; 33 base::scoped_nsobject<WebUIHoverCloseButton> button_;
34 }; 34 };
35 35
36 TEST_VIEW(HoverCloseButtonTest, button_) 36 TEST_VIEW(HoverCloseButtonTest, button_)
37 37
38 TEST_VIEW(WebUIHoverCloseButtonTest, button_) 38 TEST_VIEW(WebUIHoverCloseButtonTest, button_)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698