Index: content/public/test/content_test_suite_base.cc |
diff --git a/content/public/test/content_test_suite_base.cc b/content/public/test/content_test_suite_base.cc |
index 9307e536252d7edfd1c6b8e3f0f3eb6f4594ddc8..1da25335b1f923a19b51f1cb7dd846047aa95b54 100644 |
--- a/content/public/test/content_test_suite_base.cc |
+++ b/content/public/test/content_test_suite_base.cc |
@@ -7,6 +7,7 @@ |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
#include "base/memory/scoped_ptr.h" |
+#include "base/metrics/statistics_recorder.h" |
#include "base/test/test_suite.h" |
#include "base/threading/sequenced_worker_pool.h" |
#include "content/browser/browser_thread_impl.h" |
@@ -56,6 +57,11 @@ ContentTestSuiteBase::ContentTestSuiteBase(int argc, char** argv) |
void ContentTestSuiteBase::Initialize() { |
base::TestSuite::Initialize(); |
+ // Initialize the histograms subsystem, so that any histograms hit in tests |
+ // are correctly registered with the statistics recorder and can be queried |
+ // by tests. |
+ base::StatisticsRecorder::Initialize(); |
+ |
#if defined(OS_ANDROID) |
// Register JNI bindings for android. |
JNIEnv* env = base::android::AttachCurrentThread(); |