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

Unified Diff: components/rappor/rappor_service_unittest.cc

Issue 1058333002: Multi-dimension rappor metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup and add xml support Created 5 years, 8 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
« no previous file with comments | « components/rappor/rappor_service.cc ('k') | tools/metrics/common/models.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/rappor/rappor_service_unittest.cc
diff --git a/components/rappor/rappor_service_unittest.cc b/components/rappor/rappor_service_unittest.cc
index eefdb52ecb6446d498f250d3e09492d4acc72439..83dd9647253ef3817d165ea050345eb09e394203 100644
--- a/components/rappor/rappor_service_unittest.cc
+++ b/components/rappor/rappor_service_unittest.cc
@@ -39,8 +39,8 @@ TEST(RapporServiceTest, RecordAndExportMetrics) {
TestRapporService rappor_service;
// Multiple samples for the same metric should only generate one report.
- rappor_service.RecordSample("MyMetric", ETLD_PLUS_ONE_RAPPOR_TYPE, "foo");
- rappor_service.RecordSample("MyMetric", ETLD_PLUS_ONE_RAPPOR_TYPE, "bar");
+ rappor_service.RecordSample("MyMetric", UMA_STRING_RAPPOR_TYPE, "foo");
+ rappor_service.RecordSample("MyMetric", UMA_STRING_RAPPOR_TYPE, "bar");
RapporReports reports;
rappor_service.GetReports(&reports);
@@ -48,7 +48,7 @@ TEST(RapporServiceTest, RecordAndExportMetrics) {
const RapporReports::Report& report = reports.report(0);
EXPECT_TRUE(report.name_hash());
- // ETLD_PLUS_ONE_RAPPOR_TYPE has 128 bits
+ // UMA_STRING_RAPPOR_TYPE has 128 bits
EXPECT_EQ(16u, report.bits().size());
}
@@ -57,8 +57,8 @@ TEST(RapporServiceTest, RecordingLevel) {
TestRapporService rappor_service;
rappor_service.Update(COARSE_LEVEL, false);
- // ETLD_PLUS_ONE_RAPPOR_TYPE is a FINE_LEVEL metric
- rappor_service.RecordSample("FineMetric", ETLD_PLUS_ONE_RAPPOR_TYPE, "foo");
+ // UMA_STRING_RAPPOR_TYPE is a FINE_LEVEL metric
+ rappor_service.RecordSample("FineMetric", UMA_STRING_RAPPOR_TYPE, "foo");
RapporReports reports;
rappor_service.GetReports(&reports);
@@ -70,8 +70,8 @@ TEST(RapporServiceTest, GetRecordedSampleForMetric) {
TestRapporService rappor_service;
// Multiple samples for the same metric; only the latest is remembered.
- rappor_service.RecordSample("MyMetric", ETLD_PLUS_ONE_RAPPOR_TYPE, "foo");
- rappor_service.RecordSample("MyMetric", ETLD_PLUS_ONE_RAPPOR_TYPE, "bar");
+ rappor_service.RecordSample("MyMetric", UMA_STRING_RAPPOR_TYPE, "foo");
+ rappor_service.RecordSample("MyMetric", UMA_STRING_RAPPOR_TYPE, "bar");
std::string sample;
RapporType type;
@@ -80,7 +80,7 @@ TEST(RapporServiceTest, GetRecordedSampleForMetric) {
EXPECT_TRUE(
rappor_service.GetRecordedSampleForMetric("MyMetric", &sample, &type));
EXPECT_EQ("bar", sample);
- EXPECT_EQ(ETLD_PLUS_ONE_RAPPOR_TYPE, type);
+ EXPECT_EQ(UMA_STRING_RAPPOR_TYPE, type);
}
// Check that the incognito is respected.
« no previous file with comments | « components/rappor/rappor_service.cc ('k') | tools/metrics/common/models.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698