From 729f4f485be2a7a4797073ce6ae594c56dde01c8 Mon Sep 17 00:00:00 2001 From: "jcampan@chromium.org" Date: Tue, 9 Jun 2009 22:57:49 +0000 Subject: Fix a memory leak in a focus manager unit-test. BUG=None TEST=None Review URL: http://codereview.chromium.org/118461 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17986 0039d316-1c4b-4281-b951-d872f2087c98 --- views/focus/focus_manager_unittest.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'views/focus/focus_manager_unittest.cc') diff --git a/views/focus/focus_manager_unittest.cc b/views/focus/focus_manager_unittest.cc index 873a717..95257ec 100644 --- a/views/focus/focus_manager_unittest.cc +++ b/views/focus/focus_manager_unittest.cc @@ -807,7 +807,7 @@ TEST_F(FocusManagerTest, FocusStoreRestore) { TEST_F(FocusManagerTest, ContainsView) { View* view = new View(); - View* detached_view = new View(); + scoped_ptr detached_view(new View()); TabbedPane* tabbed_pane = new TabbedPane(); TabbedPane* nested_tabbed_pane = new TabbedPane(); NativeButton* tab_button = new NativeButton(NULL, L"tab button"); @@ -823,7 +823,7 @@ TEST_F(FocusManagerTest, ContainsView) { EXPECT_TRUE(GetFocusManager()->ContainsView(tabbed_pane)); EXPECT_TRUE(GetFocusManager()->ContainsView(nested_tabbed_pane)); EXPECT_TRUE(GetFocusManager()->ContainsView(tab_button)); - EXPECT_FALSE(GetFocusManager()->ContainsView(detached_view)); + EXPECT_FALSE(GetFocusManager()->ContainsView(detached_view.get())); } TEST_F(FocusTraversalTest, NormalTraversal) { -- cgit v1.1