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

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

Issue 2575323002: Store data reduction proxy server in a separate class (Closed)
Patch Set: ryansturm comments Created 4 years 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_interceptor_unittest.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
index 3b16a08142fedebc014f29ada5d691c793ba4849..e6c97737bd8236f7908a979c2d8d5f18c1880bbf 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
@@ -21,6 +21,8 @@
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h"
+#include "components/data_reduction_proxy/core/common/data_reduction_proxy_server.h"
+#include "components/data_reduction_proxy/proto/client_config.pb.h"
#include "components/prefs/pref_service.h"
#include "net/base/net_errors.h"
#include "net/base/request_priority.h"
@@ -115,7 +117,11 @@ class DataReductionProxyInterceptorTest : public testing::Test {
.WithParamsDefinitions(TestDataReductionProxyParams::HAS_EVERYTHING)
.Build();
default_context_.reset(new TestURLRequestContextWithDataReductionProxy(
- test_context_->config()->test_params()->proxies_for_http().front(),
+ test_context_->config()
+ ->test_params()
+ ->proxies_for_http()
+ .front()
+ .proxy_server(),
&default_network_delegate_));
default_context_->set_network_delegate(&default_network_delegate_);
default_context_->set_net_log(test_context_->net_log());
@@ -213,8 +219,9 @@ class DataReductionProxyInterceptorWithServerTest : public testing::Test {
base::TrimString(proxy_.GetURL("/").spec(), "/", &spec);
net::ProxyServer origin =
net::ProxyServer::FromURI(spec, net::ProxyServer::SCHEME_HTTP);
- std::vector<net::ProxyServer> proxies_for_http;
- proxies_for_http.push_back(origin);
+ std::vector<DataReductionProxyServer> proxies_for_http;
+ proxies_for_http.push_back(
+ DataReductionProxyServer(origin, ProxyServer::UNSPECIFIED_TYPE));
test_context_->config()->test_params()->SetProxiesForHttp(proxies_for_http);
std::string proxy_name = origin.ToURI();
proxy_service_ = net::ProxyService::CreateFixedFromPacResult(
@@ -323,7 +330,7 @@ class DataReductionProxyInterceptorEndToEndTest : public testing::Test {
}
net::ProxyServer origin() const {
- return config()->test_params()->proxies_for_http().front();
+ return config()->test_params()->proxies_for_http().front().proxy_server();
}
private:

Powered by Google App Engine
This is Rietveld 408576698