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

Unified Diff: base/test/histogram_tester_unittest.cc

Issue 379283002: Rework UMAHistogramHelper and StatisticsDeltaReader into [Chrome]HistogramTester. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Prefer base histogram_tester. ChromeHistogramTester with RunMessageLoop for NaCl Created 6 years, 5 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: 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

Powered by Google App Engine
This is Rietveld 408576698