| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 } // namespace | 209 } // namespace |
| 210 | 210 |
| 211 class ProxyConfigServiceImplTest : public testing::Test { | 211 class ProxyConfigServiceImplTest : public testing::Test { |
| 212 protected: | 212 protected: |
| 213 ProxyConfigServiceImplTest() | 213 ProxyConfigServiceImplTest() |
| 214 : ui_thread_(BrowserThread::UI, &loop_), | 214 : ui_thread_(BrowserThread::UI, &loop_), |
| 215 io_thread_(BrowserThread::IO, &loop_) {} | 215 io_thread_(BrowserThread::IO, &loop_) {} |
| 216 | 216 |
| 217 virtual void SetUp() { | 217 virtual void SetUp() { |
| 218 DBusThreadManager::InitializeWithStub(); | 218 DBusThreadManager::InitializeWithStub(); |
| 219 NetworkHandler::Initialize(); | 219 NetworkHandler::InitializeForTest(); |
| 220 | 220 |
| 221 SetUpNetwork(); | 221 SetUpNetwork(); |
| 222 | 222 |
| 223 PrefProxyConfigTrackerImpl::RegisterPrefs(pref_service_.registry()); | 223 PrefProxyConfigTrackerImpl::RegisterPrefs(pref_service_.registry()); |
| 224 ProxyConfigServiceImpl::RegisterPrefs(pref_service_.registry()); | 224 ProxyConfigServiceImpl::RegisterPrefs(pref_service_.registry()); |
| 225 proxy_config_service_.reset(new ChromeProxyConfigService(NULL)); | 225 proxy_config_service_.reset(new ChromeProxyConfigService(NULL)); |
| 226 config_service_impl_.reset(new ProxyConfigServiceImpl(&pref_service_)); | 226 config_service_impl_.reset(new ProxyConfigServiceImpl(&pref_service_)); |
| 227 config_service_impl_->SetChromeProxyConfigService( | 227 config_service_impl_->SetChromeProxyConfigService( |
| 228 proxy_config_service_.get()); | 228 proxy_config_service_.get()); |
| 229 // SetChromeProxyConfigService triggers update of initial prefs proxy | 229 // SetChromeProxyConfigService triggers update of initial prefs proxy |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 pref_service_.RemoveRecommendedPref(prefs::kProxy); | 443 pref_service_.RemoveRecommendedPref(prefs::kProxy); |
| 444 SyncGetLatestProxyConfig(&actual_config); | 444 SyncGetLatestProxyConfig(&actual_config); |
| 445 EXPECT_EQ(network_params.auto_detect, actual_config.auto_detect()); | 445 EXPECT_EQ(network_params.auto_detect, actual_config.auto_detect()); |
| 446 EXPECT_EQ(network_params.pac_url, actual_config.pac_url()); | 446 EXPECT_EQ(network_params.pac_url, actual_config.pac_url()); |
| 447 EXPECT_TRUE(network_params.proxy_rules.Matches( | 447 EXPECT_TRUE(network_params.proxy_rules.Matches( |
| 448 actual_config.proxy_rules())); | 448 actual_config.proxy_rules())); |
| 449 } | 449 } |
| 450 } | 450 } |
| 451 | 451 |
| 452 } // namespace chromeos | 452 } // namespace chromeos |
| OLD | NEW |