Index: base/metrics/sparse_histogram_unittest.cc |
diff --git a/base/metrics/sparse_histogram_unittest.cc b/base/metrics/sparse_histogram_unittest.cc |
index 825381d8535dca6e045e47cf8fd592f72eb55500..6a0efa4e12b616cc28229076edc5011b4662c75d 100644 |
--- a/base/metrics/sparse_histogram_unittest.cc |
+++ b/base/metrics/sparse_histogram_unittest.cc |
@@ -64,9 +64,9 @@ TEST_F(SparseHistogramTest, BasicTest) { |
} |
TEST_F(SparseHistogramTest, MacroBasicTest) { |
- HISTOGRAM_SPARSE_SLOWLY("Sparse", 100); |
- HISTOGRAM_SPARSE_SLOWLY("Sparse", 200); |
- HISTOGRAM_SPARSE_SLOWLY("Sparse", 100); |
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Sparse", 100); |
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Sparse", 200); |
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Sparse", 100); |
StatisticsRecorder::Histograms histograms; |
StatisticsRecorder::GetHistograms(&histograms); |
@@ -76,7 +76,8 @@ TEST_F(SparseHistogramTest, MacroBasicTest) { |
EXPECT_EQ(SPARSE_HISTOGRAM, sparse_histogram->GetHistogramType()); |
EXPECT_EQ("Sparse", sparse_histogram->histogram_name()); |
- EXPECT_EQ(HistogramBase::kNoFlags, sparse_histogram->flags()); |
+ EXPECT_EQ(HistogramBase::kUmaTargetedHistogramFlag, |
+ sparse_histogram->flags()); |
scoped_ptr<HistogramSamples> samples = sparse_histogram->SnapshotSamples(); |
EXPECT_EQ(3, samples->TotalCount()); |
@@ -84,20 +85,6 @@ TEST_F(SparseHistogramTest, MacroBasicTest) { |
EXPECT_EQ(1, samples->GetCount(200)); |
} |
-TEST_F(SparseHistogramTest, MacroUmaTest) { |
- UMA_HISTOGRAM_SPARSE_SLOWLY("Uma", 100); |
- |
- StatisticsRecorder::Histograms histograms; |
- StatisticsRecorder::GetHistograms(&histograms); |
- |
- ASSERT_EQ(1U, histograms.size()); |
- HistogramBase* sparse_histogram = histograms[0]; |
- |
- EXPECT_EQ("Uma", sparse_histogram->histogram_name()); |
- EXPECT_EQ(HistogramBase::kUmaTargetedHistogramFlag, |
- sparse_histogram->flags()); |
-} |
- |
TEST_F(SparseHistogramTest, MacroInLoopTest) { |
// Unlike the macros in histogram.h, SparseHistogram macros can have a |
// variable as histogram name. |