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

Side by Side Diff: chrome/browser/ui/cocoa/tab_contents/overlay_separator_view_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/tab_contents/overlay_separator_view.h" 5 #import "chrome/browser/ui/cocoa/tab_contents/overlay_separator_view.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 9
10 class OverlayBottomSeparatorViewTest : public CocoaTest { 10 class OverlayBottomSeparatorViewTest : public CocoaTest {
11 public: 11 public:
12 OverlayBottomSeparatorViewTest() { 12 OverlayBottomSeparatorViewTest() {
13 NSView* contentView = [test_window() contentView]; 13 NSView* contentView = [test_window() contentView];
14 bottom_view_.reset([[OverlayBottomSeparatorView alloc] 14 bottom_view_.reset([[OverlayBottomSeparatorView alloc]
15 initWithFrame:[contentView bounds]]); 15 initWithFrame:[contentView bounds]]);
16 [contentView addSubview:bottom_view_]; 16 [contentView addSubview:bottom_view_];
17 } 17 }
18 18
19 protected: 19 protected:
20 scoped_nsobject<OverlayBottomSeparatorView> bottom_view_; 20 base::scoped_nsobject<OverlayBottomSeparatorView> bottom_view_;
21 21
22 private: 22 private:
23 DISALLOW_COPY_AND_ASSIGN(OverlayBottomSeparatorViewTest); 23 DISALLOW_COPY_AND_ASSIGN(OverlayBottomSeparatorViewTest);
24 }; 24 };
25 25
26 TEST_VIEW(OverlayBottomSeparatorViewTest, bottom_view_); 26 TEST_VIEW(OverlayBottomSeparatorViewTest, bottom_view_);
27 27
28 TEST_F(OverlayBottomSeparatorViewTest, PreferredHeight) { 28 TEST_F(OverlayBottomSeparatorViewTest, PreferredHeight) {
29 EXPECT_LT(0, [OverlayBottomSeparatorView preferredHeight]); 29 EXPECT_LT(0, [OverlayBottomSeparatorView preferredHeight]);
30 } 30 }
31 31
32 class OverlayTopSeparatorViewTest : public CocoaTest { 32 class OverlayTopSeparatorViewTest : public CocoaTest {
33 public: 33 public:
34 OverlayTopSeparatorViewTest() { 34 OverlayTopSeparatorViewTest() {
35 NSView* contentView = [test_window() contentView]; 35 NSView* contentView = [test_window() contentView];
36 top_view_.reset( 36 top_view_.reset(
37 [[OverlayTopSeparatorView alloc] initWithFrame:[contentView bounds]]); 37 [[OverlayTopSeparatorView alloc] initWithFrame:[contentView bounds]]);
38 [contentView addSubview:top_view_]; 38 [contentView addSubview:top_view_];
39 } 39 }
40 40
41 protected: 41 protected:
42 scoped_nsobject<OverlayTopSeparatorView> top_view_; 42 base::scoped_nsobject<OverlayTopSeparatorView> top_view_;
43 43
44 private: 44 private:
45 DISALLOW_COPY_AND_ASSIGN(OverlayTopSeparatorViewTest); 45 DISALLOW_COPY_AND_ASSIGN(OverlayTopSeparatorViewTest);
46 }; 46 };
47 47
48 TEST_VIEW(OverlayTopSeparatorViewTest, top_view_); 48 TEST_VIEW(OverlayTopSeparatorViewTest, top_view_);
49 49
50 TEST_F(OverlayTopSeparatorViewTest, PreferredHeight) { 50 TEST_F(OverlayTopSeparatorViewTest, PreferredHeight) {
51 EXPECT_LT(0, [OverlayTopSeparatorView preferredHeight]); 51 EXPECT_LT(0, [OverlayTopSeparatorView preferredHeight]);
52 } 52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698