Index: chrome/browser/ui/webui/ntp/ntp_user_data_logger_unittest.cc |
diff --git a/chrome/browser/ui/webui/ntp/ntp_user_data_logger_unittest.cc b/chrome/browser/ui/webui/ntp/ntp_user_data_logger_unittest.cc |
index 59632f0ad2058ac9bf1b46576d56624bdc09a141..e6493f199538811183357f826fe75f6393c03c10 100644 |
--- a/chrome/browser/ui/webui/ntp/ntp_user_data_logger_unittest.cc |
+++ b/chrome/browser/ui/webui/ntp/ntp_user_data_logger_unittest.cc |
@@ -9,6 +9,7 @@ |
#include "base/metrics/statistics_recorder.h" |
#include "base/strings/utf_string_conversions.h" |
#include "chrome/common/ntp_logging_events.h" |
+#include "content/public/test/test_browser_thread_bundle.h" |
#include "testing/gtest/include/gtest/gtest.h" |
namespace { |
@@ -36,7 +37,11 @@ base::HistogramBase::Count GetBinCount(const std::string& histogram_name, |
} // namespace |
-TEST(NTPUserDataLoggerTest, TestLogging) { |
+class NTPUserDataLoggerTest : public testing::Test { |
+ content::TestBrowserThreadBundle thread_bundle_; |
+}; |
+ |
+TEST_F(NTPUserDataLoggerTest, TestLogging) { |
base::StatisticsRecorder::Initialize(); |
// Ensure empty statistics. |
@@ -101,7 +106,7 @@ TEST(NTPUserDataLoggerTest, TestLogging) { |
EXPECT_EQ(1, GetTotalCount("NewTabPage.SuggestionsType")); |
} |
-TEST(NTPUserDataLoggerTest, TestLogMostVisitedImpression) { |
+TEST_F(NTPUserDataLoggerTest, TestLogMostVisitedImpression) { |
base::StatisticsRecorder::Initialize(); |
EXPECT_EQ(0, GetBinCount("NewTabPage.SuggestionsImpression.foobar", 1)); |
@@ -127,7 +132,7 @@ TEST(NTPUserDataLoggerTest, TestLogMostVisitedImpression) { |
EXPECT_EQ(1, GetBinCount("NewTabPage.SuggestionsImpression.foobar", 5)); |
} |
-TEST(NTPUserDataLoggerTest, TestLogMostVisitedNavigation) { |
+TEST_F(NTPUserDataLoggerTest, TestLogMostVisitedNavigation) { |
base::StatisticsRecorder::Initialize(); |
EXPECT_EQ(0, GetTotalCount("NewTabPage.MostVisited")); |