diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-15 20:48:51 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-15 20:48:51 +0000 |
commit | 949b920cd2854256235b235cd93c5fc92cc6f97c (patch) | |
tree | 323942aa2a9df8cfa3c6641c805ae559bf0dc41d /chrome/browser | |
parent | 5fb6e15d7b52dc94059b14e3a73c8700257ed254 (diff) | |
download | chromium_src-949b920cd2854256235b235cd93c5fc92cc6f97c.zip chromium_src-949b920cd2854256235b235cd93c5fc92cc6f97c.tar.gz chromium_src-949b920cd2854256235b235cd93c5fc92cc6f97c.tar.bz2 |
[Mac] Fix a very silly leak in FindBarViewTest.
BUG=http://crbug.com/30391
TEST=Valgrind passes.
Review URL: http://codereview.chromium.org/507012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34599 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/cocoa/find_bar_view_unittest.mm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/cocoa/find_bar_view_unittest.mm b/chrome/browser/cocoa/find_bar_view_unittest.mm index 5f83cda..cfc9ca7 100644 --- a/chrome/browser/cocoa/find_bar_view_unittest.mm +++ b/chrome/browser/cocoa/find_bar_view_unittest.mm @@ -43,8 +43,8 @@ class FindBarViewTest : public CocoaTest { TEST_VIEW(FindBarViewTest, view_) TEST_F(FindBarViewTest, FindBarEatsMouseClicksInBackgroundArea) { - MouseDownViewPong* pongView = - [[MouseDownViewPong alloc] initWithFrame:NSMakeRect(0, 0, 200, 200)]; + scoped_nsobject<MouseDownViewPong> pongView( + [[MouseDownViewPong alloc] initWithFrame:NSMakeRect(0, 0, 200, 200)]); // Remove all of the subviews of the findbar, to make sure we don't // accidentally hit a subview when trying to simulate a click in the @@ -53,7 +53,7 @@ TEST_F(FindBarViewTest, FindBarEatsMouseClicksInBackgroundArea) { [view_ setFrame:NSMakeRect(0, 0, 200, 200)]; // Add the pong view as a sibling of the findbar. - [[test_window() contentView] addSubview:pongView + [[test_window() contentView] addSubview:pongView.get() positioned:NSWindowBelow relativeTo:view_]; @@ -68,12 +68,12 @@ TEST_F(FindBarViewTest, FindBarEatsMouseClicksInBackgroundArea) { } TEST_F(FindBarViewTest, FindBarPassesThroughClicksInTransparentArea) { - MouseDownViewPong* pongView = - [[MouseDownViewPong alloc] initWithFrame:NSMakeRect(0, 0, 200, 200)]; + scoped_nsobject<MouseDownViewPong> pongView( + [[MouseDownViewPong alloc] initWithFrame:NSMakeRect(0, 0, 200, 200)]); [view_ setFrame:NSMakeRect(0, 0, 200, 200)]; // Add the pong view as a sibling of the findbar. - [[test_window() contentView] addSubview:pongView + [[test_window() contentView] addSubview:pongView.get() positioned:NSWindowBelow relativeTo:view_]; |