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

Unified Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_params_unittest.cc

Issue 1345523005: Added command line flag to override list of proxies from Data Saver API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased on master Created 5 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
Index: components/data_reduction_proxy/core/common/data_reduction_proxy_params_unittest.cc
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_params_unittest.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_params_unittest.cc
index e4234254894c48136779e9022240f4635c4988ec..d4870ae7e97a8c334e92fcd262b7525e174c0b54 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_params_unittest.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_params_unittest.cc
@@ -423,4 +423,20 @@ TEST_F(DataReductionProxyParamsTest, GetConfigServiceURL) {
}
}
+TEST(DataReductionProxyParamsStandaloneTest, OverrideProxiesForHttp) {
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ switches::kDataReductionProxyHttpProxies,
+ "http://override-first.net;http://override-second.net");
+ DataReductionProxyParams params(
+ DataReductionProxyParams::kAllowAllProxyConfigurations);
+
+ std::vector<net::ProxyServer> expected_override_proxies_for_http;
+ expected_override_proxies_for_http.push_back(net::ProxyServer::FromURI(
+ "http://override-first.net", net::ProxyServer::SCHEME_HTTP));
+ expected_override_proxies_for_http.push_back(net::ProxyServer::FromURI(
+ "http://override-second.net", net::ProxyServer::SCHEME_HTTP));
+
+ EXPECT_EQ(expected_override_proxies_for_http, params.proxies_for_http());
+}
+
} // namespace data_reduction_proxy

Powered by Google App Engine
This is Rietveld 408576698