OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #import "base/scoped_nsobject.h" | 7 #import "base/scoped_nsobject.h" |
8 #include "chrome/browser/ui/cocoa/browser_test_helper.h" | 8 #include "chrome/browser/ui/cocoa/browser_test_helper.h" |
9 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 9 #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
10 #import "chrome/browser/ui/cocoa/previewable_contents_controller.h" | 10 #import "chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "testing/platform_test.h" | 12 #include "testing/platform_test.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 class PreviewableContentsControllerTest : public CocoaTest { | 16 class PreviewableContentsControllerTest : public CocoaTest { |
17 public: | 17 public: |
18 virtual void SetUp() { | 18 virtual void SetUp() { |
19 CocoaTest::SetUp(); | 19 CocoaTest::SetUp(); |
20 controller_.reset([[PreviewableContentsController alloc] init]); | 20 controller_.reset([[PreviewableContentsController alloc] init]); |
21 [[test_window() contentView] addSubview:[controller_ view]]; | 21 [[test_window() contentView] addSubview:[controller_ view]]; |
22 } | 22 } |
23 | 23 |
24 scoped_nsobject<PreviewableContentsController> controller_; | 24 scoped_nsobject<PreviewableContentsController> controller_; |
25 }; | 25 }; |
26 | 26 |
27 TEST_VIEW(PreviewableContentsControllerTest, [controller_ view]) | 27 TEST_VIEW(PreviewableContentsControllerTest, [controller_ view]) |
28 | 28 |
29 // TODO(rohitrao): Test showing and hiding the preview. This may require | 29 // TODO(rohitrao): Test showing and hiding the preview. This may require |
30 // changing the interface to take in a TabContentsView* instead of a | 30 // changing the interface to take in a TabContentsView* instead of a |
31 // TabContents*. | 31 // TabContents*. |
32 | 32 |
33 } // namespace | 33 } // namespace |
34 | 34 |
OLD | NEW |