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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc

Issue 2776583002: Fix recording of DataReductionProxy.ConfigService.HTTPRequests (Closed)
Patch Set: sclittle comments Created 3 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 | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc
index 064d0aa45e243041fded14c64276ace5cd035799..96a824b2b4f81a5589b7d91143f64d5e75784a71 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_unittest.cc
@@ -684,8 +684,10 @@ TEST_F(DataReductionProxyBypassStatsEndToEndTest,
kErrorBody.c_str(), "HTTP/1.1 200 OK\r\n\r\n",
kBody.c_str());
- histogram_tester.ExpectUniqueSample(
- "DataReductionProxy.ConfigService.HTTPRequests", 1, 1);
+ EXPECT_LT(
+ 0u, histogram_tester
+ .GetAllSamples("DataReductionProxy.ConfigService.HTTPRequests")
+ .size());
// The first request caused the proxy to be marked as bad, so this second
// request should not come through the proxy.
@@ -701,10 +703,8 @@ TEST_F(DataReductionProxyBypassStatsEndToEndTest,
ExpectOtherBypassedBytesHistogramsEmpty(histogram_tester,
test_case.histogram_name);
- // "DataReductionProxy.ConfigService.HTTPRequests" should not be recorded
- // for bypassed requests.
- histogram_tester.ExpectUniqueSample(
- "DataReductionProxy.ConfigService.HTTPRequests", 1, 1);
+ histogram_tester.ExpectBucketCount(
+ "DataReductionProxy.ConfigService.HTTPRequests", 0, 0);
}
}
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698