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.
5 #import "chrome/browser/ui/cocoa/omnibox/omnibox_popup_separator_view.h"
7 #include "base/mac/scoped_nsobject.h"
8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
10 class OmniboxPopupBottomSeparatorViewTest : public CocoaTest {
12 OmniboxPopupBottomSeparatorViewTest() {
13 NSView* contentView = [test_window() contentView];
14 bottom_view_.reset([[OmniboxPopupBottomSeparatorView alloc]
15 initWithFrame:[contentView bounds]]);
16 [contentView addSubview:bottom_view_];
20 base::scoped_nsobject<OmniboxPopupBottomSeparatorView> bottom_view_;
23 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupBottomSeparatorViewTest);
26 TEST_VIEW(OmniboxPopupBottomSeparatorViewTest, bottom_view_);
28 TEST_F(OmniboxPopupBottomSeparatorViewTest, PreferredHeight) {
29 EXPECT_LT(0, [OmniboxPopupBottomSeparatorView preferredHeight]);
32 class OmniboxPopupTopSeparatorViewTest : public CocoaTest {
34 OmniboxPopupTopSeparatorViewTest() {
35 NSView* contentView = [test_window() contentView];
36 top_view_.reset([[OmniboxPopupTopSeparatorView alloc]
37 initWithFrame:[contentView bounds]]);
38 [contentView addSubview:top_view_];
42 base::scoped_nsobject<OmniboxPopupTopSeparatorView> top_view_;
45 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupTopSeparatorViewTest);
48 TEST_VIEW(OmniboxPopupTopSeparatorViewTest, top_view_);
50 TEST_F(OmniboxPopupTopSeparatorViewTest, PreferredHeight) {
51 EXPECT_LT(0, [OmniboxPopupTopSeparatorView preferredHeight]);