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

Unified Diff: ppapi/tests/test_uma.cc

Issue 141393002: Return a NULL histogram pointer on construction error (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, git cl format Created 6 years, 9 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 | « chrome/test/data/extensions/api_test/metrics/test.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_uma.cc
diff --git a/ppapi/tests/test_uma.cc b/ppapi/tests/test_uma.cc
index ef2100585a93cbca3ab80806f00ebf3381c3b335..c7bdbde4a8f21ccc21578ea1d7b9e2d2dde27045 100644
--- a/ppapi/tests/test_uma.cc
+++ b/ppapi/tests/test_uma.cc
@@ -30,6 +30,11 @@ std::string TestUMA::TestCount() {
uma_interface_->HistogramCustomCounts(instance, name, 30, 1, 100, 50);
uma_interface_->HistogramCustomCounts(instance, name, 20, 1, 100, 50);
uma_interface_->HistogramCustomCounts(instance, name, 40, 1, 100, 50);
+ // Test that passing in different construction arguments for the same
+ // histogram name does not crash.
+ uma_interface_->HistogramCustomCounts(instance, name, 40, 1, 100, 100);
+ uma_interface_->HistogramCustomCounts(instance, name, 40, 1, 90, 50);
+ uma_interface_->HistogramCustomCounts(instance, name, 40, 10, 100, 50);
PASS();
}
@@ -41,6 +46,11 @@ std::string TestUMA::TestTime() {
uma_interface_->HistogramCustomTimes(instance, name, 1000, 1, 10000, 50);
uma_interface_->HistogramCustomTimes(instance, name, 5000, 1, 10000, 50);
uma_interface_->HistogramCustomTimes(instance, name, 10, 1, 10000, 50);
+ // Test that passing in different construction arguments for the same
+ // histogram name does not crash.
+ uma_interface_->HistogramCustomTimes(instance, name, 10, 1, 10000, 100);
+ uma_interface_->HistogramCustomTimes(instance, name, 10, 1, 9000, 50);
+ uma_interface_->HistogramCustomTimes(instance, name, 10, 100, 10000, 50);
PASS();
}
@@ -53,6 +63,9 @@ std::string TestUMA::TestEnum() {
uma_interface_->HistogramEnumeration(instance, name, 3, 5);
uma_interface_->HistogramEnumeration(instance, name, 1, 5);
uma_interface_->HistogramEnumeration(instance, name, 2, 5);
+ // Test that passing in different construction arguments for the same
+ // histogram name does not crash.
+ uma_interface_->HistogramEnumeration(instance, name, 2, 6);
PASS();
}
« no previous file with comments | « chrome/test/data/extensions/api_test/metrics/test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698