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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats_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_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 9648a28d30b2218cf607b4fa19cf75d345cfa217..2df5e30c2222020e61f2c008664719818fb5053e 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
@@ -27,6 +27,8 @@
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_headers_test_utils.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/testing_pref_service.h"
#include "net/base/host_port_pair.h"
#include "net/base/load_flags.h"
@@ -284,7 +286,12 @@ class DataReductionProxyBypassStatsEndToEndTest : public testing::Test {
finish_code);
if (url.SchemeIsCryptographic() ||
(!config()->test_params()->proxies_for_http().empty() &&
- config()->test_params()->proxies_for_http().front().is_https())) {
+ config()
+ ->test_params()
+ ->proxies_for_http()
+ .front()
+ .proxy_server()
+ .is_https())) {
mock_socket_factory_.AddSSLSocketDataProvider(&ssl_socket_data_provider);
}
@@ -697,7 +704,8 @@ TEST_F(DataReductionProxyBypassStatsEndToEndTest,
TEST_F(DataReductionProxyBypassStatsEndToEndTest, BypassedBytesNetErrorOther) {
// Make the data reduction proxy host fail to resolve.
- net::ProxyServer origin = config()->test_params()->proxies_for_http().front();
+ net::ProxyServer origin =
+ config()->test_params()->proxies_for_http().front().proxy_server();
std::unique_ptr<net::MockHostResolver> host_resolver(
new net::MockHostResolver());
host_resolver->rules()->AddSimulatedFailure(origin.host_port_pair().host());
@@ -966,9 +974,10 @@ TEST_F(DataReductionProxyBypassStatsEndToEndTest, HttpProxyScheme) {
TEST_F(DataReductionProxyBypassStatsEndToEndTest, HttpsProxyScheme) {
net::ProxyServer origin =
net::ProxyServer::FromURI("test.com:443", net::ProxyServer::SCHEME_HTTPS);
- std::vector<net::ProxyServer> proxies_for_http;
- proxies_for_http.push_back(origin);
- config()->test_params()->SetProxiesForHttp(proxies_for_http);
+ std::vector<DataReductionProxyServer> data_reduction_proxy_servers;
+ data_reduction_proxy_servers.push_back(
+ DataReductionProxyServer(origin, ProxyServer::UNSPECIFIED_TYPE));
+ config()->test_params()->SetProxiesForHttp(data_reduction_proxy_servers);
InitializeContext();

Powered by Google App Engine
This is Rietveld 408576698