summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-13 22:12:53 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-13 22:12:53 +0000
commit242c8f40453ad06a06fc2db689a4d3aa8ca20d2f (patch)
tree668636e5c7b0b6ec3b3b82ae5e2be791dbbcef31
parent87b41942ee67ef4b91ba4cf82a1778a2ed503e09 (diff)
downloadchromium_src-242c8f40453ad06a06fc2db689a4d3aa8ca20d2f.zip
chromium_src-242c8f40453ad06a06fc2db689a4d3aa8ca20d2f.tar.gz
chromium_src-242c8f40453ad06a06fc2db689a4d3aa8ca20d2f.tar.bz2
Fix a heapchecker leak by fixing a test.
BUG=53936 TEST=see bug Review URL: http://codereview.chromium.org/3296021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59287 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/gtk/bookmark_bar_gtk_unittest.cc18
-rw-r--r--tools/heapcheck/suppressions.txt31
2 files changed, 15 insertions, 34 deletions
diff --git a/chrome/browser/gtk/bookmark_bar_gtk_unittest.cc b/chrome/browser/gtk/bookmark_bar_gtk_unittest.cc
index 1be108c..c74aac8cf 100644
--- a/chrome/browser/gtk/bookmark_bar_gtk_unittest.cc
+++ b/chrome/browser/gtk/bookmark_bar_gtk_unittest.cc
@@ -27,6 +27,9 @@ class BookmarkBarGtkUnittest : public ::testing::Test {
BookmarkBarGtkUnittest()
: ui_thread_(ChromeThread::UI, &message_loop_),
file_thread_(ChromeThread::FILE, &message_loop_) {
+ }
+
+ virtual void SetUp() {
profile_.reset(new TestingProfile());
profile_->CreateBookmarkModel(true);
profile_->BlockUntilBookmarkModelLoaded();
@@ -37,13 +40,22 @@ class BookmarkBarGtkUnittest : public ::testing::Test {
origin_provider_.get()));
}
+ virtual void TearDown() {
+ bookmark_bar_.reset();
+ origin_provider_.reset();
+ browser_.reset();
+ profile_.reset();
+ message_loop_.RunAllPending();
+ }
+
+ MessageLoopForUI message_loop_;
+ ChromeThread ui_thread_;
+ ChromeThread file_thread_;
+
scoped_ptr<TestingProfile> profile_;
scoped_ptr<Browser> browser_;
scoped_ptr<TabstripOriginProvider> origin_provider_;
scoped_ptr<BookmarkBarGtk> bookmark_bar_;
- MessageLoopForUI message_loop_;
- ChromeThread ui_thread_;
- ChromeThread file_thread_;
};
TEST_F(BookmarkBarGtkUnittest, DisplaysHelpMessageOnEmpty) {
diff --git a/tools/heapcheck/suppressions.txt b/tools/heapcheck/suppressions.txt
index 46b1199..a84bcaa 100644
--- a/tools/heapcheck/suppressions.txt
+++ b/tools/heapcheck/suppressions.txt
@@ -947,37 +947,6 @@
fun:MessageLoop::RunTask
}
{
- bug_53936_a
- Heapcheck:Leak
- fun:__gnu_cxx::new_allocator::allocate
- fun:std::string::_Rep::_S_create
- fun:std::string::_Rep::_M_clone
- fun:std::string::reserve
- fun:std::string::append
- fun:FilePath::Append
- fun:chrome::GetUserDownloadsDirectory
- fun:chrome::PathProvider
- fun:PathService::Get
- fun:DefaultDownloadDirectory
- fun:DefaultSingletonTraits::New
- fun:Singleton::get
- fun:download_util::GetDefaultDownloadDirectory
- fun:DownloadPrefs::RegisterUserPrefs
- fun:browser::RegisterUserPrefs
- fun:browser::RegisterAllPrefs
-}
-{
- bug_53936_b
- Heapcheck:Leak
- fun:CancelableTask* NewRunnableFunction
- fun:DownloadPrefs::RegisterUserPrefs
- fun:browser::RegisterUserPrefs
- fun:browser::RegisterAllPrefs
- fun:TestingProfile::GetPrefs
- fun:Browser
- fun:BookmarkBarGtkUnittest
-}
-{
bug_54689
Heapcheck:Leak
fun:WTF::fastMalloc