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

Unified Diff: components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc

Issue 333113002: Move data reduction proxy to Chrome-Proxy header for authentication (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@flywheel-refactor-net-fake-a-redirect-response-headers-chrome-proxy-auth
Patch Set: errata Created 6 years, 6 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/browser/data_reduction_proxy_settings_test_utils.cc
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc
index 62a5d4b47b1b48e9420770ab526a43057daa98f6..115f780fa47657c83e21ec57863a13250d0aabc5 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.cc
@@ -18,10 +18,6 @@ using testing::Return;
namespace {
-const char kDataReductionProxy[] = "https://foo.com:443/";
-const char kDataReductionProxyFallback[] = "http://bar.com:80/";
-const char kDataReductionProxyKey[] = "12345";
-
const char kProbeURLWithOKResponse[] = "http://ok.org/";
const char kWarmupURLWithNoContentResponse[] = "http://warm.org/";
@@ -78,28 +74,12 @@ void TestDataReductionProxyConfig::Disable() {
ssl_origin_ = "";
}
-// static
-void DataReductionProxySettingsTestBase::AddTestProxyToCommandLine() {
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kDataReductionProxy, kDataReductionProxy);
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kDataReductionProxyFallback, kDataReductionProxyFallback);
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kDataReductionProxyKey, kDataReductionProxyKey);
- CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kDataReductionProxyProbeURL, kProbeURLWithOKResponse);
-}
-
DataReductionProxySettingsTestBase::DataReductionProxySettingsTestBase()
: testing::Test() {
}
DataReductionProxySettingsTestBase::~DataReductionProxySettingsTestBase() {}
-void DataReductionProxySettingsTestBase::AddProxyToCommandLine() {
- AddTestProxyToCommandLine();
-}
-
// testing::Test implementation:
void DataReductionProxySettingsTestBase::SetUp() {
PrefRegistrySimple* registry = pref_service_.registry();
@@ -112,7 +92,7 @@ void DataReductionProxySettingsTestBase::SetUp() {
registry->RegisterBooleanPref(prefs::kDataReductionProxyAltEnabled, false);
registry->RegisterBooleanPref(prefs::kDataReductionProxyWasEnabledBefore,
false);
- AddProxyToCommandLine();
+ //AddProxyToCommandLine();
ResetSettings(true, true, false, true);
ListPrefUpdate original_update(&pref_service_,
@@ -128,6 +108,12 @@ void DataReductionProxySettingsTestBase::SetUp() {
pref_service_.SetInt64(
prefs::kDailyHttpContentLengthLastUpdateDate,
last_update_time_.ToInternalValue());
+ expected_params_.reset(new TestDataReductionProxyParams(
+ DataReductionProxyParams::kAllowed |
+ DataReductionProxyParams::kFallbackAllowed |
+ DataReductionProxyParams::kPromoAllowed,
+ TestDataReductionProxyParams::HAS_EVERYTHING &
+ ~TestDataReductionProxyParams::HAS_DEV_ORIGIN));
}
template <class C>

Powered by Google App Engine
This is Rietveld 408576698