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

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

Issue 2365823002: Improve logging of DRP.ConfigService.HTTPRequests (Closed)
Patch Set: Rebased, Addressed megjablon comments Created 4 years, 3 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_config_service_client.cc » ('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 97898ae4c031f08ad648d43c13b07fec32283f36..7eab12e0d2c61496b5af63f100f31a0468a883a8 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
@@ -895,6 +895,10 @@ TEST_F(DataReductionProxyBypassStatsEndToEndTest,
CreateAndExecuteRequest(
GURL("http://foo.com"), test_case.initial_response_headers,
kErrorBody.c_str(), "HTTP/1.1 200 OK\r\n\r\n", kBody.c_str());
+
+ histogram_tester.ExpectUniqueSample(
+ "DataReductionProxy.ConfigService.HTTPRequests", 1, 1);
+
// The first request caused the proxy to be marked as bad, so this second
// request should not come through the proxy.
CreateAndExecuteRequest(GURL("http://bar.com"), "HTTP/1.1 200 OK\r\n\r\n",
@@ -907,6 +911,11 @@ TEST_F(DataReductionProxyBypassStatsEndToEndTest,
kNextBody.size(), 1);
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);
}
}
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698