Chromium Code Reviews| Index: base/test/histogram_tester_unittest.cc |
| diff --git a/base/test/statistics_delta_reader_unittest.cc b/base/test/histogram_tester_unittest.cc |
| similarity index 76% |
| rename from base/test/statistics_delta_reader_unittest.cc |
| rename to base/test/histogram_tester_unittest.cc |
| index 55180d115d1fd22ca1ce07192b3fc6004f35e456..0f61ad8a9368164a9eaa916269ac290f36688e7e 100644 |
| --- a/base/test/statistics_delta_reader_unittest.cc |
| +++ b/base/test/histogram_tester_unittest.cc |
| @@ -2,7 +2,7 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "base/test/statistics_delta_reader.h" |
| +#include "base/test/histogram_tester.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/metrics/histogram.h" |
| @@ -11,22 +11,22 @@ |
| namespace base { |
| -TEST(StatisticsDeltaReaderTest, Scope) { |
| +TEST(HistogramTesterTest, Scope) { |
| // Record a histogram before the creation of the recorder. |
| UMA_HISTOGRAM_BOOLEAN("Test", true); |
| - StatisticsDeltaReader reader; |
| + HistogramTester tester; |
| // Verify that no histogram is recorded. |
| scoped_ptr<HistogramSamples> samples( |
| - reader.GetHistogramSamplesSinceCreation("Test")); |
| + tester.GetBaseHistogramSamples("Test")); |
| EXPECT_FALSE(samples); |
| // Record a histogram after the creation of the recorder. |
| UMA_HISTOGRAM_BOOLEAN("Test", true); |
| // Verify that one histogram is recorded. |
| - samples = reader.GetHistogramSamplesSinceCreation("Test"); |
| + samples = tester.GetBaseHistogramSamples("Test"); |
| EXPECT_TRUE(samples); |
| EXPECT_EQ(1, samples->TotalCount()); |
| } |
|
Ilya Sherman
2014/07/15 03:56:35
Please add test coverage for the other methods in
Mike Lerman
2014/07/16 17:29:03
Done. I can add tests that will succeed, (e.g. log
|