OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/sad_tab_view_cocoa.h" | 5 #import "chrome/browser/ui/cocoa/tab_contents/sad_tab_view_cocoa.h" |
| 6 |
6 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
7 | 8 |
8 namespace { | 9 namespace { |
9 | 10 |
10 class SadTabViewTest : public CocoaTest { | 11 class SadTabViewTest : public CocoaTest { |
11 public: | 12 public: |
12 SadTabViewTest() { | 13 SadTabViewTest() { |
13 NSRect content_frame = [[test_window() contentView] frame]; | 14 NSRect content_frame = [[test_window() contentView] frame]; |
14 base::scoped_nsobject<SadTabView> view( | 15 base::scoped_nsobject<SadTabView> view( |
15 [[SadTabView alloc] initWithFrame:content_frame]); | 16 [[SadTabView alloc] initWithFrame:content_frame]); |
16 view_ = view.get(); | 17 view_ = view.get(); |
17 [[test_window() contentView] addSubview:view_]; | 18 [[test_window() contentView] addSubview:view_]; |
18 } | 19 } |
19 | 20 |
20 SadTabView* view_; // Weak. Owned by the view hierarchy. | 21 SadTabView* view_; // Weak. Owned by the view hierarchy. |
21 }; | 22 }; |
22 | 23 |
23 TEST_VIEW(SadTabViewTest, view_); | 24 TEST_VIEW(SadTabViewTest, view_); |
24 | 25 |
25 } // namespace | 26 } // namespace |
OLD | NEW |