| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 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::Initialize(); |
| 219 NetworkHandler::Initialize(); | 219 NetworkHandler::Initialize(); |
| 220 | 220 |
| 221 SetUpNetwork(); | 221 SetUpNetwork(); |
| 222 | 222 |
| 223 PrefProxyConfigTrackerImpl::RegisterPrefs(pref_service_.registry()); | 223 PrefProxyConfigTrackerImpl::RegisterPrefs(pref_service_.registry()); |
| 224 | 224 |
| 225 // Create a ProxyConfigServiceImpl like for the system request context. | 225 // Create a ProxyConfigServiceImpl like for the system request context. |
| 226 config_service_impl_.reset( | 226 config_service_impl_.reset( |
| 227 new ProxyConfigServiceImpl(NULL, // no profile prefs | 227 new ProxyConfigServiceImpl(NULL, // no profile prefs |
| 228 &pref_service_)); | 228 &pref_service_)); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 pref_service_.RemoveRecommendedPref(prefs::kProxy); | 445 pref_service_.RemoveRecommendedPref(prefs::kProxy); |
| 446 SyncGetLatestProxyConfig(&actual_config); | 446 SyncGetLatestProxyConfig(&actual_config); |
| 447 EXPECT_EQ(network_params.auto_detect, actual_config.auto_detect()); | 447 EXPECT_EQ(network_params.auto_detect, actual_config.auto_detect()); |
| 448 EXPECT_EQ(network_params.pac_url, actual_config.pac_url()); | 448 EXPECT_EQ(network_params.pac_url, actual_config.pac_url()); |
| 449 EXPECT_TRUE(network_params.proxy_rules.Matches( | 449 EXPECT_TRUE(network_params.proxy_rules.Matches( |
| 450 actual_config.proxy_rules())); | 450 actual_config.proxy_rules())); |
| 451 } | 451 } |
| 452 } | 452 } |
| 453 | 453 |
| 454 } // namespace chromeos | 454 } // namespace chromeos |
| OLD | NEW |