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

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

Issue 2626963003: Remove kAllowed and kFallbackAllowed from data reduction proxy (Closed)
Patch Set: Addressed nits Created 3 years, 11 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
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 3ff9218c198fe9df4d74b683525313397bfdd052..064d0aa45e243041fded14c64276ace5cd035799 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
@@ -254,20 +254,26 @@ class DataReductionProxyBypassStatsEndToEndTest : public testing::Test {
}
void SetUp() override {
- // Only use the primary data reduction proxy in order to make it easier to
- // test bypassed bytes due to proxy fallbacks. This way, a test just needs
- // to cause one proxy fallback in order for the data reduction proxy to be
- // fully bypassed.
- drp_test_context_ =
- DataReductionProxyTestContext::Builder()
- .WithParamsFlags(DataReductionProxyParams::kAllowed)
- .WithURLRequestContext(&context_)
- .WithMockClientSocketFactory(&mock_socket_factory_)
- .Build();
+ drp_test_context_ = DataReductionProxyTestContext::Builder()
+ .WithParamsFlags(0)
+ .WithURLRequestContext(&context_)
+ .WithMockClientSocketFactory(&mock_socket_factory_)
+ .Build();
drp_test_context_->AttachToURLRequestContext(&context_storage_);
context_.set_client_socket_factory(&mock_socket_factory_);
proxy_delegate_ = drp_test_context_->io_data()->CreateProxyDelegate();
context_.set_proxy_delegate(proxy_delegate_.get());
+
+ // Only use the primary data reduction proxy in order to make it easier to
+ // test bypassed bytes due to proxy fallbacks. This way, a test just needs
+ // to cause one proxy fallback in order for the data reduction proxy to be
+ // fully bypassed.
+ std::vector<DataReductionProxyServer> data_reduction_proxy_servers;
+ data_reduction_proxy_servers.push_back(DataReductionProxyServer(
+ net::ProxyServer::FromURI(config()->test_params()->DefaultOrigin(),
+ net::ProxyServer::SCHEME_HTTP),
+ ProxyServer::CORE));
+ config()->test_params()->SetProxiesForHttp(data_reduction_proxy_servers);
}
// Create and execute a fake request using the data reduction proxy stack.

Powered by Google App Engine
This is Rietveld 408576698