summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-16 02:04:17 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-16 02:04:17 +0000
commit94b921421fed742750a07e3be58e010b847a0f3e (patch)
treeae794a540e13c776e26ebaf2578a093d2aac3f45
parentcb0aca4ed634cddbc6fcdacdfb3d23e15a0c5055 (diff)
downloadchromium_src-94b921421fed742750a07e3be58e010b847a0f3e.zip
chromium_src-94b921421fed742750a07e3be58e010b847a0f3e.tar.gz
chromium_src-94b921421fed742750a07e3be58e010b847a0f3e.tar.bz2
Fix leaky tests KeywordEditorCocoaControllerTest and EditSearchEngineCocoaControllerTest.
BUG=30390,30392 TEST=Run unit_tests under Valgrind. Review URL: http://codereview.chromium.org/507010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34639 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/cocoa/edit_search_engine_cocoa_controller_unittest.mm5
-rw-r--r--chrome/browser/cocoa/keyword_editor_cocoa_controller_unittest.mm5
-rw-r--r--chrome/test/data/valgrind/unit_tests.gtest_mac.txt2
3 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/edit_search_engine_cocoa_controller_unittest.mm b/chrome/browser/cocoa/edit_search_engine_cocoa_controller_unittest.mm
index e7d690c..974dd7f 100644
--- a/chrome/browser/cocoa/edit_search_engine_cocoa_controller_unittest.mm
+++ b/chrome/browser/cocoa/edit_search_engine_cocoa_controller_unittest.mm
@@ -58,6 +58,11 @@ class EditSearchEngineControllerTest : public CocoaTest {
}
virtual void TearDown() {
+ // Force the window to load so we hit |-awakeFromNib| to register as the
+ // window's delegate so that the controller can clean itself up in
+ // |-windowWillClose:|.
+ ASSERT_TRUE([controller_ window]);
+
[controller_ close];
CocoaTest::TearDown();
}
diff --git a/chrome/browser/cocoa/keyword_editor_cocoa_controller_unittest.mm b/chrome/browser/cocoa/keyword_editor_cocoa_controller_unittest.mm
index aad19ed..ccdaf09 100644
--- a/chrome/browser/cocoa/keyword_editor_cocoa_controller_unittest.mm
+++ b/chrome/browser/cocoa/keyword_editor_cocoa_controller_unittest.mm
@@ -58,6 +58,11 @@ class KeywordEditorCocoaControllerTest : public CocoaTest {
}
virtual void TearDown() {
+ // Force the window to load so we hit |-awakeFromNib| to register as the
+ // window's delegate so that the controller can clean itself up in
+ // |-windowWillClose:|.
+ ASSERT_TRUE([controller_ window]);
+
[controller_ close];
CocoaTest::TearDown();
}
diff --git a/chrome/test/data/valgrind/unit_tests.gtest_mac.txt b/chrome/test/data/valgrind/unit_tests.gtest_mac.txt
index c0387d5..b5d6c0f 100644
--- a/chrome/test/data/valgrind/unit_tests.gtest_mac.txt
+++ b/chrome/test/data/valgrind/unit_tests.gtest_mac.txt
@@ -25,8 +25,6 @@ BookmarkMenuTest.Basics
BrowserWindowCocoaTest.TestFullscreen
ChromeBrowserWindowTest.DoesHideTitle
ClearBrowsingDataControllerTest.*
-EditSearchEngineControllerTest.*
-KeywordEditorCocoaControllerTest.*
NSMenuItemAdditionsTest.TestMOnDifferentLayouts
PrefsControllerTest.GetPrefsViewForPage
PrefsControllerTest.GetToolbarItemForPage