OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings_test_utils.h" | 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings_test_utils.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 } | 125 } |
126 | 126 |
127 void DataReductionProxySettingsTestBase::CheckOnPrefChange( | 127 void DataReductionProxySettingsTestBase::CheckOnPrefChange( |
128 bool enabled, | 128 bool enabled, |
129 bool expected_enabled, | 129 bool expected_enabled, |
130 bool managed) { | 130 bool managed) { |
131 ExpectSetProxyPrefs(expected_enabled, false); | 131 ExpectSetProxyPrefs(expected_enabled, false); |
132 if (managed) { | 132 if (managed) { |
133 test_context_->pref_service()->SetManagedPref( | 133 test_context_->pref_service()->SetManagedPref( |
134 test_context_->GetDataReductionProxyEnabledPrefName(), | 134 test_context_->GetDataReductionProxyEnabledPrefName(), |
135 new base::FundamentalValue(enabled)); | 135 new base::Value(enabled)); |
136 } else { | 136 } else { |
137 test_context_->SetDataReductionProxyEnabled(enabled); | 137 test_context_->SetDataReductionProxyEnabled(enabled); |
138 } | 138 } |
139 test_context_->RunUntilIdle(); | 139 test_context_->RunUntilIdle(); |
140 // Never expect the proxy to be restricted for pref change tests. | 140 // Never expect the proxy to be restricted for pref change tests. |
141 } | 141 } |
142 | 142 |
143 void DataReductionProxySettingsTestBase::InitDataReductionProxy( | 143 void DataReductionProxySettingsTestBase::InitDataReductionProxy( |
144 bool enabled_at_startup) { | 144 bool enabled_at_startup) { |
145 settings_->InitDataReductionProxySettings( | 145 settings_->InitDataReductionProxySettings( |
(...skipping 10 matching lines...) Expand all Loading... |
156 test_context_->RunUntilIdle(); | 156 test_context_->RunUntilIdle(); |
157 } | 157 } |
158 | 158 |
159 void DataReductionProxySettingsTestBase::CheckDataReductionProxySyntheticTrial( | 159 void DataReductionProxySettingsTestBase::CheckDataReductionProxySyntheticTrial( |
160 bool enabled) { | 160 bool enabled) { |
161 EXPECT_EQ(enabled ? "Enabled" : "Disabled", | 161 EXPECT_EQ(enabled ? "Enabled" : "Disabled", |
162 synthetic_field_trials_["SyntheticDataReductionProxySetting"]); | 162 synthetic_field_trials_["SyntheticDataReductionProxySetting"]); |
163 } | 163 } |
164 | 164 |
165 } // namespace data_reduction_proxy | 165 } // namespace data_reduction_proxy |
OLD | NEW |