Index: chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm |
diff --git a/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm b/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm |
index 0ddf62f97efb07933de304d9d34ac17820d3fa16..2694d1d37a4e02fb78c84963b14b16e8be0953fc 100644 |
--- a/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm |
+++ b/chrome/browser/ui/cocoa/tab_contents/sad_tab_controller_unittest.mm |
@@ -52,13 +52,13 @@ class SadTabControllerTest : public ChromeRenderViewHostTestHarness { |
// Creates the controller and adds its view to contents, caller has ownership. |
SadTabController* CreateController() { |
- NSView* contentView = [test_window_ contentView]; |
SadTabController* controller = |
- [[SadTabController alloc] initWithTabContents:contents() |
- superview:contentView]; |
+ [[SadTabController alloc] initWithTabContents:contents()]; |
EXPECT_TRUE(controller); |
NSView* view = [controller view]; |
EXPECT_TRUE(view); |
+ NSView* contentView = [test_window_ contentView]; |
+ [contentView addSubview:view]; |
return controller; |
} |