summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-11 17:52:40 +0000
committerskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-11 17:52:40 +0000
commitf8742e3ba254518bc11409f7b31288eb6a2e4e5a (patch)
treed7ba943431e5ee18c58e15c3acfc93a93b087649 /chrome
parentddb27114b28167378341b3bcfc47219269d9ff48 (diff)
downloadchromium_src-f8742e3ba254518bc11409f7b31288eb6a2e4e5a.zip
chromium_src-f8742e3ba254518bc11409f7b31288eb6a2e4e5a.tar.gz
chromium_src-f8742e3ba254518bc11409f7b31288eb6a2e4e5a.tar.bz2
Fixing memory leak
BUG=121181 TEST=Unittest Review URL: http://codereview.chromium.org/10034020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131800 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/ui/window_sizer_aura_unittest.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/chrome/browser/ui/window_sizer_aura_unittest.cc b/chrome/browser/ui/window_sizer_aura_unittest.cc
index 9d09b87..3420f5c 100644
--- a/chrome/browser/ui/window_sizer_aura_unittest.cc
+++ b/chrome/browser/ui/window_sizer_aura_unittest.cc
@@ -612,28 +612,28 @@ TEST_F(WindowSizerTestWithBrowser, PlaceNewWindowOverOldWindow) {
// existing windows.
window_owning_browser.reset(new Browser(Browser::TYPE_TABBED,
profile.get()));
- BrowserWindow* browser_window = new TestBrowserWindowAura(
- window_owning_browser.get(),
- window.get());
- window_owning_browser.get()->SetWindowForTesting(browser_window);
+ scoped_ptr<BrowserWindow> browser_window;
+ browser_window.reset(new TestBrowserWindowAura(window_owning_browser.get(),
+ window.get()));
+ window_owning_browser->SetWindowForTesting(browser_window.get());
scoped_ptr<Browser> popup_owning_browser;
// Creating a popup to make sure it does not interfere with the positioning.
popup_owning_browser.reset(new Browser(Browser::TYPE_POPUP,
profile.get()));
- BrowserWindow* browser_popup = new TestBrowserWindowAura(
- popup_owning_browser.get(),
- popup.get());
- popup_owning_browser.get()->SetWindowForTesting(browser_popup);
+ scoped_ptr<BrowserWindow> browser_popup;
+ browser_popup.reset(new TestBrowserWindowAura(popup_owning_browser.get(),
+ popup.get()));
+ popup_owning_browser->SetWindowForTesting(browser_popup.get());
scoped_ptr<Browser> panel_owning_browser;
// Creating a panel to make sure it does not interfere with the positioning.
panel_owning_browser.reset(new Browser(Browser::TYPE_PANEL,
profile.get()));
- BrowserWindow* browser_panel = new TestBrowserWindowAura(
- panel_owning_browser.get(),
- panel.get());
- panel_owning_browser.get()->SetWindowForTesting(browser_panel);
+ scoped_ptr<BrowserWindow> browser_panel;
+ browser_panel.reset(new TestBrowserWindowAura(panel_owning_browser.get(),
+ panel.get()));
+ panel_owning_browser->SetWindowForTesting(browser_panel.get());
window->Show();
{ // With a shown window it's size should get returned.