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_settings_unittest.cc

Issue 2626963003: Remove kAllowed and kFallbackAllowed from data reduction proxy (Closed)
Patch Set: Addressed nits Created 3 years, 11 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/browser/data_reduction_proxy_settings_unittest.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_unittest.cc
index dd162d19880e03c3ddf0f24d4ca3de348707a031..d2ef4375ad67eb0e7f6f60713fe9e2149e03f692 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_unittest.cc
@@ -651,7 +651,7 @@ TEST_F(DataReductionProxySettingsTest, TestDaysSinceEnabledWithTestClock) {
std::unique_ptr<base::SimpleTestClock> clock(new base::SimpleTestClock());
base::SimpleTestClock* clock_ptr = clock.get();
clock_ptr->Advance(base::TimeDelta::FromDays(1));
- ResetSettings(std::move(clock), true, true, false, false);
+ ResetSettings(std::move(clock), false, false);
base::Time last_enabled_time = clock_ptr->Now();
@@ -735,7 +735,7 @@ TEST_F(DataReductionProxySettingsTest, TestDaysSinceSavingsCleared) {
std::unique_ptr<base::SimpleTestClock> clock(new base::SimpleTestClock());
base::SimpleTestClock* clock_ptr = clock.get();
clock_ptr->Advance(base::TimeDelta::FromDays(1));
- ResetSettings(std::move(clock), true, true, false, false);
+ ResetSettings(std::move(clock), false, false);
InitPrefMembers();
base::HistogramTester histogram_tester;
@@ -771,27 +771,4 @@ TEST_F(DataReductionProxySettingsTest, TestGetDailyContentLengths) {
}
}
-TEST_F(DataReductionProxySettingsTest, CheckInitMetricsWhenNotAllowed) {
- // No call to |AddProxyToCommandLine()| was made, so the proxy feature
- // should be unavailable.
- // Clear the command line. Setting flags can force the proxy to be allowed.
- base::CommandLine::ForCurrentProcess()->InitFromArgv(0, NULL);
-
- ResetSettings(nullptr, false, false, false, false);
- MockSettings* settings = static_cast<MockSettings*>(settings_.get());
- EXPECT_FALSE(settings->allowed_);
- EXPECT_CALL(*settings, RecordStartupState(PROXY_NOT_AVAILABLE));
-
- settings_->InitDataReductionProxySettings(
- test_context_->GetDataReductionProxyEnabledPrefName(),
- test_context_->pref_service(), test_context_->io_data(),
- test_context_->CreateDataReductionProxyService(settings_.get()));
- settings_->SetCallbackToRegisterSyntheticFieldTrial(
- base::Bind(&DataReductionProxySettingsTestBase::
- SyntheticFieldTrialRegistrationCallback,
- base::Unretained(this)));
-
- test_context_->RunUntilIdle();
-}
-
} // namespace data_reduction_proxy

Powered by Google App Engine
This is Rietveld 408576698