| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/proxy_config_service_impl.h" | 5 #include "chrome/browser/chromeos/proxy_config_service_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 }, | 228 }, |
| 229 }; // tests | 229 }; // tests |
| 230 | 230 |
| 231 template<typename TESTBASE> | 231 template<typename TESTBASE> |
| 232 class ProxyConfigServiceImplTestBase : public TESTBASE { | 232 class ProxyConfigServiceImplTestBase : public TESTBASE { |
| 233 protected: | 233 protected: |
| 234 ProxyConfigServiceImplTestBase() | 234 ProxyConfigServiceImplTestBase() |
| 235 : ui_thread_(BrowserThread::UI, &loop_), | 235 : ui_thread_(BrowserThread::UI, &loop_), |
| 236 io_thread_(BrowserThread::IO, &loop_) {} | 236 io_thread_(BrowserThread::IO, &loop_) {} |
| 237 | 237 |
| 238 virtual void Init(PrefServiceSimple* pref_service) { | 238 virtual void Init(TestingPrefServiceSimple* pref_service) { |
| 239 ASSERT_TRUE(pref_service); | 239 ASSERT_TRUE(pref_service); |
| 240 DBusThreadManager::Initialize(); | 240 DBusThreadManager::Initialize(); |
| 241 PrefProxyConfigTrackerImpl::RegisterPrefs(pref_service); | 241 PrefProxyConfigTrackerImpl::RegisterPrefs(pref_service->registry()); |
| 242 ProxyConfigServiceImpl::RegisterPrefs(pref_service); | 242 ProxyConfigServiceImpl::RegisterPrefs(pref_service->registry()); |
| 243 proxy_config_service_.reset(new ChromeProxyConfigService(NULL)); | 243 proxy_config_service_.reset(new ChromeProxyConfigService(NULL)); |
| 244 config_service_impl_.reset(new ProxyConfigServiceImpl(pref_service)); | 244 config_service_impl_.reset(new ProxyConfigServiceImpl(pref_service)); |
| 245 config_service_impl_->SetChromeProxyConfigService( | 245 config_service_impl_->SetChromeProxyConfigService( |
| 246 proxy_config_service_.get()); | 246 proxy_config_service_.get()); |
| 247 // SetChromeProxyConfigService triggers update of initial prefs proxy | 247 // SetChromeProxyConfigService triggers update of initial prefs proxy |
| 248 // config by tracker to chrome proxy config service, so flush all pending | 248 // config by tracker to chrome proxy config service, so flush all pending |
| 249 // tasks so that tests start fresh. | 249 // tasks so that tests start fresh. |
| 250 loop_.RunUntilIdle(); | 250 loop_.RunUntilIdle(); |
| 251 } | 251 } |
| 252 | 252 |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 EXPECT_EQ(network_params.auto_detect, actual_config.auto_detect()); | 552 EXPECT_EQ(network_params.auto_detect, actual_config.auto_detect()); |
| 553 EXPECT_EQ(network_params.pac_url, actual_config.pac_url()); | 553 EXPECT_EQ(network_params.pac_url, actual_config.pac_url()); |
| 554 EXPECT_TRUE(network_params.proxy_rules.Matches( | 554 EXPECT_TRUE(network_params.proxy_rules.Matches( |
| 555 actual_config.proxy_rules())); | 555 actual_config.proxy_rules())); |
| 556 } | 556 } |
| 557 } | 557 } |
| 558 | 558 |
| 559 } // namespace | 559 } // namespace |
| 560 | 560 |
| 561 } // namespace chromeos | 561 } // namespace chromeos |
| OLD | NEW |