| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #import "chrome/browser/ui/cocoa/tab_contents/overlay_separator_view.h" | |
| 6 | |
| 7 #include "base/mac/scoped_nsobject.h" | |
| 8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | |
| 9 | |
| 10 class OverlayBottomSeparatorViewTest : public CocoaTest { | |
| 11 public: | |
| 12 OverlayBottomSeparatorViewTest() { | |
| 13 NSView* contentView = [test_window() contentView]; | |
| 14 bottom_view_.reset([[OverlayBottomSeparatorView alloc] | |
| 15 initWithFrame:[contentView bounds]]); | |
| 16 [contentView addSubview:bottom_view_]; | |
| 17 } | |
| 18 | |
| 19 protected: | |
| 20 base::scoped_nsobject<OverlayBottomSeparatorView> bottom_view_; | |
| 21 | |
| 22 private: | |
| 23 DISALLOW_COPY_AND_ASSIGN(OverlayBottomSeparatorViewTest); | |
| 24 }; | |
| 25 | |
| 26 TEST_VIEW(OverlayBottomSeparatorViewTest, bottom_view_); | |
| 27 | |
| 28 TEST_F(OverlayBottomSeparatorViewTest, PreferredHeight) { | |
| 29 EXPECT_LT(0, [OverlayBottomSeparatorView preferredHeight]); | |
| 30 } | |
| 31 | |
| 32 class OverlayTopSeparatorViewTest : public CocoaTest { | |
| 33 public: | |
| 34 OverlayTopSeparatorViewTest() { | |
| 35 NSView* contentView = [test_window() contentView]; | |
| 36 top_view_.reset( | |
| 37 [[OverlayTopSeparatorView alloc] initWithFrame:[contentView bounds]]); | |
| 38 [contentView addSubview:top_view_]; | |
| 39 } | |
| 40 | |
| 41 protected: | |
| 42 base::scoped_nsobject<OverlayTopSeparatorView> top_view_; | |
| 43 | |
| 44 private: | |
| 45 DISALLOW_COPY_AND_ASSIGN(OverlayTopSeparatorViewTest); | |
| 46 }; | |
| 47 | |
| 48 TEST_VIEW(OverlayTopSeparatorViewTest, top_view_); | |
| 49 | |
| 50 TEST_F(OverlayTopSeparatorViewTest, PreferredHeight) { | |
| 51 EXPECT_LT(0, [OverlayTopSeparatorView preferredHeight]); | |
| 52 } | |
| OLD | NEW |