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

Unified Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.cc

Issue 30883003: Simple fallback implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@patched
Patch Set: Created 7 years, 2 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: chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.cc
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.cc
index 9a96db8cea2ebc4674dc3e1176bbf1a6f82245b6..fad8e281b1ee0dfbd1ed6fa035ecfa4f3aa056b7 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.cc
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.cc
@@ -22,7 +22,7 @@
#include "url/gurl.h"
const char kDataReductionProxyOrigin[] = "https://foo:443/";
-const char kDataReductionProxyOriginHostPort[] = "foo:443";
+const char kDataReductionProxyFallback[] = "http://bar:80";
const char kDataReductionProxyAuth[] = "12345";
const char kProbeURLWithOKResponse[] = "http://ok.org/";
@@ -90,6 +90,8 @@ void DataReductionProxySettingsTestBase::AddProxyToCommandLine() {
CommandLine::ForCurrentProcess()->AppendSwitchASCII(
switches::kSpdyProxyAuthOrigin, kDataReductionProxyOrigin);
CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ switches::kSpdyProxyAuthFallback, kDataReductionProxyFallback);
+ CommandLine::ForCurrentProcess()->AppendSwitchASCII(
switches::kSpdyProxyAuthValue, kDataReductionProxyAuth);
}
@@ -134,8 +136,10 @@ void DataReductionProxySettingsTestBase::CheckProxyPref(
void DataReductionProxySettingsTestBase::CheckProxyConfigs(
bool expected_enabled) {
if (expected_enabled) {
+ std::string main_proxy = kDataReductionProxyOrigin;
+ std::string fallback_proxy = kDataReductionProxyFallback;
std::string servers =
- "http=" + Settings()->GetDataReductionProxyOrigin() + ",direct://;";
+ "http=" + main_proxy + "," + fallback_proxy + ",direct://;";
CheckProxyPref(servers,
ProxyModeToString(ProxyPrefs::MODE_FIXED_SERVERS));
} else {

Powered by Google App Engine
This is Rietveld 408576698