OLD | NEW |
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/omnibox/omnibox_popup_separator_view.h" | 5 #import "chrome/browser/ui/cocoa/omnibox/omnibox_popup_separator_view.h" |
6 | 6 |
7 #include "base/mac/scoped_nsobject.h" | 7 #include "base/mac/scoped_nsobject.h" |
| 8 #include "base/macros.h" |
8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 9 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
9 | 10 |
10 class OmniboxPopupBottomSeparatorViewTest : public CocoaTest { | 11 class OmniboxPopupBottomSeparatorViewTest : public CocoaTest { |
11 public: | 12 public: |
12 OmniboxPopupBottomSeparatorViewTest() { | 13 OmniboxPopupBottomSeparatorViewTest() { |
13 NSView* contentView = [test_window() contentView]; | 14 NSView* contentView = [test_window() contentView]; |
14 bottom_view_.reset([[OmniboxPopupBottomSeparatorView alloc] | 15 bottom_view_.reset([[OmniboxPopupBottomSeparatorView alloc] |
15 initWithFrame:[contentView bounds]]); | 16 initWithFrame:[contentView bounds]]); |
16 [contentView addSubview:bottom_view_]; | 17 [contentView addSubview:bottom_view_]; |
17 } | 18 } |
(...skipping 25 matching lines...) Expand all Loading... |
43 | 44 |
44 private: | 45 private: |
45 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupTopSeparatorViewTest); | 46 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupTopSeparatorViewTest); |
46 }; | 47 }; |
47 | 48 |
48 TEST_VIEW(OmniboxPopupTopSeparatorViewTest, top_view_); | 49 TEST_VIEW(OmniboxPopupTopSeparatorViewTest, top_view_); |
49 | 50 |
50 TEST_F(OmniboxPopupTopSeparatorViewTest, PreferredHeight) { | 51 TEST_F(OmniboxPopupTopSeparatorViewTest, PreferredHeight) { |
51 EXPECT_LT(0, [OmniboxPopupTopSeparatorView preferredHeight]); | 52 EXPECT_LT(0, [OmniboxPopupTopSeparatorView preferredHeight]); |
52 } | 53 } |
OLD | NEW |