| Index: chrome/browser/cocoa/extension_shelf_controller_unittest.mm
|
| ===================================================================
|
| --- chrome/browser/cocoa/extension_shelf_controller_unittest.mm (revision 29973)
|
| +++ chrome/browser/cocoa/extension_shelf_controller_unittest.mm (working copy)
|
| @@ -2,19 +2,15 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#import <Cocoa/Cocoa.h>
|
| -
|
| #include "base/scoped_nsobject.h"
|
| #include "chrome/browser/cocoa/browser_test_helper.h"
|
| #import "chrome/browser/cocoa/cocoa_test_helper.h"
|
| #import "chrome/browser/cocoa/extension_shelf_controller.h"
|
| #import "chrome/browser/cocoa/view_resizer_pong.h"
|
| -#include "testing/gtest/include/gtest/gtest.h"
|
| -#include "testing/platform_test.h"
|
|
|
| namespace {
|
|
|
| -class ExtensionShelfControllerTest : public PlatformTest {
|
| +class ExtensionShelfControllerTest : public CocoaTest {
|
| public:
|
| ExtensionShelfControllerTest() {
|
| resizeDelegate_.reset([[ViewResizerPong alloc] init]);
|
| @@ -23,14 +19,18 @@
|
| controller_.reset([[ExtensionShelfController alloc]
|
| initWithBrowser:helper_.browser()
|
| resizeDelegate:resizeDelegate_.get()]);
|
| + NSView* view = [controller_ view];
|
| + EXPECT_TRUE(view);
|
| + [[test_window() contentView] addSubview:view];
|
| }
|
|
|
| - CocoaTestHelper cocoa_helper_; // Inits Cocoa, creates window, etc...
|
| BrowserTestHelper helper_;
|
| scoped_nsobject<ExtensionShelfController> controller_;
|
| scoped_nsobject<ViewResizerPong> resizeDelegate_;
|
| };
|
|
|
| +TEST_VIEW(ExtensionShelfControllerTest, [controller_ view])
|
| +
|
| // Check that |hide:| tells the delegate to set the shelf's height to zero.
|
| TEST_F(ExtensionShelfControllerTest, HideSetsHeightToZero) {
|
| [resizeDelegate_ setHeight:10];
|
| @@ -47,10 +47,4 @@
|
| EXPECT_EQ([controller_ height], [resizeDelegate_ height]);
|
| }
|
|
|
| -// Test adding to the view hierarchy, mostly to ensure nothing leaks or crashes.
|
| -TEST_F(ExtensionShelfControllerTest, Add) {
|
| - [cocoa_helper_.contentView() addSubview:[controller_ view]];
|
| - [controller_ wasInsertedIntoWindow];
|
| -}
|
| -
|
| } // namespace
|
|
|
| Property changes on: chrome/browser/cocoa/extension_shelf_controller_unittest.mm
|
| ___________________________________________________________________
|
| Added: svn:eol-style
|
| + LF
|
|
|
|
|