diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-09 22:57:49 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-09 22:57:49 +0000 |
commit | 729f4f485be2a7a4797073ce6ae594c56dde01c8 (patch) | |
tree | 27cfc3ae10d434cd3dd426dd35f28577756a52f1 /views/focus | |
parent | 6862562d7d9abcdf21ef0afe5c2cc7e963368dff (diff) | |
download | chromium_src-729f4f485be2a7a4797073ce6ae594c56dde01c8.zip chromium_src-729f4f485be2a7a4797073ce6ae594c56dde01c8.tar.gz chromium_src-729f4f485be2a7a4797073ce6ae594c56dde01c8.tar.bz2 |
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
Diffstat (limited to 'views/focus')
-rw-r--r-- | views/focus/focus_manager_unittest.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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<View> 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) { |