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

Unified Diff: base/test/histogram_tester_unittest.cc

Issue 2451213003: Demonstrates example when GetTotalCountsForPrefix returns true for the suffix. (Closed)
Patch Set: Disables the test Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/histogram_tester_unittest.cc
diff --git a/base/test/histogram_tester_unittest.cc b/base/test/histogram_tester_unittest.cc
index c4d49af942f783a571b270a591c5b2faaee85e03..f896eaa3e89357abda627fee1d2f9d4b9fb52c0e 100644
--- a/base/test/histogram_tester_unittest.cc
+++ b/base/test/histogram_tester_unittest.cc
@@ -21,6 +21,7 @@ const char kHistogram2[] = "Test2";
const char kHistogram3[] = "Test3";
const char kHistogram4[] = "Test4";
const char kHistogram5[] = "Test5";
+const char kHistogramSuffix[] = "Test4.Test5";
} // namespace
@@ -117,4 +118,12 @@ TEST_F(HistogramTesterTest, TestGetAllSamples_NoSamples) {
EXPECT_THAT(tester.GetAllSamples(kHistogram5), IsEmpty());
}
+// Wrong behaviour for GetTotalCountForPrefix: https://crbug.com/659977
+TEST_F(HistogramTesterTest, DISABLED_TestGetTotalCountsForPrefix) {
+ HistogramTester tester;
+ UMA_HISTOGRAM_ENUMERATION(kHistogramSuffix, 2, 5);
Paweł Hajdan Jr. 2016/10/27 16:55:51 nit: Is it worth extracting this as a constant? In
melandory 2016/10/28 07:30:15 Funnily, in-lining Test4.Test5 triggers the presub
+
+ EXPECT_TRUE(tester.GetTotalCountsForPrefix("Test5").empty());
+}
+
} // namespace base
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698