Index: chrome/browser/ui/cocoa/toolbar/toolbar_controller_unittest.mm |
=================================================================== |
--- chrome/browser/ui/cocoa/toolbar/toolbar_controller_unittest.mm (revision 148382) |
+++ chrome/browser/ui/cocoa/toolbar/toolbar_controller_unittest.mm (working copy) |
@@ -49,7 +49,7 @@ |
kWrenchIndex, kLocationIndex, kBrowserActionContainerViewIndex |
}; |
- virtual void SetUp() { |
+ virtual void SetUp() OVERRIDE { |
CocoaProfileTest::SetUp(); |
ASSERT_TRUE(browser()); |
@@ -71,6 +71,11 @@ |
[parent addSubview:[bar_ view]]; |
} |
+ virtual void TearDown() OVERRIDE { |
+ bar_.reset(); // browser() must outlive the ToolbarController. |
+ CocoaProfileTest::TearDown(); |
+ } |
+ |
// Make sure the enabled state of the view is the same as the corresponding |
// command in the updater. The views are in the declaration order of outlets. |
void CompareState(CommandUpdater* updater, NSArray* views) { |