diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-10 20:47:10 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-10 20:47:10 +0000 |
commit | b31dbaf51d30c2a37db28874e60724d66050eb97 (patch) | |
tree | 85c05248963ccac50b0c3a84e2e0e723fa0bbbde /ash/wm/window_manager_unittest.cc | |
parent | baca781783aa72fb63d9bb621a26fbaba025a4ef (diff) | |
download | chromium_src-b31dbaf51d30c2a37db28874e60724d66050eb97.zip chromium_src-b31dbaf51d30c2a37db28874e60724d66050eb97.tar.gz chromium_src-b31dbaf51d30c2a37db28874e60724d66050eb97.tar.bz2 |
Fix leaks in ash_unittests
also suppressed leaks in non chrome component
plus a couple of cleanups (eliminated unused code/variables)
BUG=144990,146947
TEST=valgrind reports no leak on ash_unittests
Review URL: https://chromiumcodereview.appspot.com/10907101
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/window_manager_unittest.cc')
-rw-r--r-- | ash/wm/window_manager_unittest.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc index 52d210a..777d9b9 100644 --- a/ash/wm/window_manager_unittest.cc +++ b/ash/wm/window_manager_unittest.cc @@ -150,11 +150,10 @@ TEST_F(WindowManagerTest, Focus) { EXPECT_EQ(w12.get(), w12->GetFocusManager()->GetFocusedWindow()); // Set the focus to w123, but make the w1 not activatable. - test::TestActivationDelegate* activation_delegate = new - test::TestActivationDelegate(false); + test::TestActivationDelegate activation_delegate(false); w123->Focus(); EXPECT_EQ(w123.get(), w12->GetFocusManager()->GetFocusedWindow()); - aura::client::SetActivationDelegate(w1.get(), activation_delegate); + aura::client::SetActivationDelegate(w1.get(), &activation_delegate); // Hiding the focused window will set the focus to NULL because // parent window is not focusable. @@ -168,7 +167,7 @@ TEST_F(WindowManagerTest, Focus) { w123->Show(); w123->Focus(); EXPECT_EQ(w123.get(), w12->GetFocusManager()->GetFocusedWindow()); - aura::client::SetActivationDelegate(w1.get(), activation_delegate); + aura::client::SetActivationDelegate(w1.get(), &activation_delegate); // Removing the focused window will set the focus to NULL because // parent window is not focusable. |