Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Unified Diff: components/metrics/leak_detector/leak_detector_unittest.cc

Issue 1665553002: metrics: Connect leak detector to allocator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing include Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/metrics/leak_detector/leak_detector_unittest.cc
diff --git a/components/metrics/leak_detector/leak_detector_unittest.cc b/components/metrics/leak_detector/leak_detector_unittest.cc
index a134a17b130bc2000c659e12f28c0890b580ca8e..34541fed34ed64cfea3b9ab1a0e35f4dd67fd041 100644
--- a/components/metrics/leak_detector/leak_detector_unittest.cc
+++ b/components/metrics/leak_detector/leak_detector_unittest.cc
@@ -6,6 +6,7 @@
#include <set>
+#include "base/allocator/allocator_extension.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/test/test_browser_thread_bundle.h"
@@ -78,6 +79,11 @@ class LeakDetectorTest : public ::testing::Test {
DISALLOW_COPY_AND_ASSIGN(LeakDetectorTest);
};
+TEST_F(LeakDetectorTest, AllocatorHooks) {
+ EXPECT_EQ(&LeakDetector::AllocHook, base::allocator::GetSingleAllocHook());
+ EXPECT_EQ(&LeakDetector::FreeHook, base::allocator::GetSingleFreeHook());
+}
+
TEST_F(LeakDetectorTest, NotifyObservers) {
// Generate two sets of leak reports.
std::vector<LeakReport> reports1(3);

Powered by Google App Engine
This is Rietveld 408576698