| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/net/pref_proxy_config_service.h" | 5 #include "chrome/browser/net/pref_proxy_config_service.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "chrome/browser/net/chrome_url_request_context.h" | 9 #include "chrome/browser/net/chrome_url_request_context.h" |
| 10 #include "chrome/browser/prefs/pref_service_mock_builder.h" | 10 #include "chrome/browser/prefs/pref_service_mock_builder.h" |
| 11 #include "chrome/browser/prefs/proxy_config_dictionary.h" | 11 #include "chrome/browser/prefs/proxy_config_dictionary.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 template<typename TESTBASE> | 63 template<typename TESTBASE> |
| 64 class PrefProxyConfigServiceTestBase : public TESTBASE { | 64 class PrefProxyConfigServiceTestBase : public TESTBASE { |
| 65 protected: | 65 protected: |
| 66 PrefProxyConfigServiceTestBase() | 66 PrefProxyConfigServiceTestBase() |
| 67 : ui_thread_(BrowserThread::UI, &loop_), | 67 : ui_thread_(BrowserThread::UI, &loop_), |
| 68 io_thread_(BrowserThread::IO, &loop_) {} | 68 io_thread_(BrowserThread::IO, &loop_) {} |
| 69 | 69 |
| 70 virtual void Init(PrefService* pref_service) { | 70 virtual void Init(PrefService* pref_service) { |
| 71 ASSERT_TRUE(pref_service); | 71 ASSERT_TRUE(pref_service); |
| 72 PrefProxyConfigService::RegisterUserPrefs(pref_service); | 72 PrefProxyConfigService::RegisterPrefs(pref_service); |
| 73 fixed_config_.set_pac_url(GURL(kFixedPacUrl)); | 73 fixed_config_.set_pac_url(GURL(kFixedPacUrl)); |
| 74 delegate_service_ = new TestProxyConfigService(fixed_config_); | 74 delegate_service_ = new TestProxyConfigService(fixed_config_); |
| 75 proxy_config_tracker_ = new PrefProxyConfigTracker(pref_service); | 75 proxy_config_tracker_ = new PrefProxyConfigTracker(pref_service); |
| 76 proxy_config_service_.reset( | 76 proxy_config_service_.reset( |
| 77 new PrefProxyConfigService(proxy_config_tracker_.get(), | 77 new PrefProxyConfigService(proxy_config_tracker_.get(), |
| 78 delegate_service_)); | 78 delegate_service_)); |
| 79 } | 79 } |
| 80 | 80 |
| 81 virtual void TearDown() { | 81 virtual void TearDown() { |
| 82 proxy_config_tracker_->DetachFromPrefService(); | 82 proxy_config_tracker_->DetachFromPrefService(); |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 net::ProxyRulesExpectation::Empty(), | 378 net::ProxyRulesExpectation::Empty(), |
| 379 }, | 379 }, |
| 380 }; | 380 }; |
| 381 | 381 |
| 382 INSTANTIATE_TEST_CASE_P( | 382 INSTANTIATE_TEST_CASE_P( |
| 383 PrefProxyConfigServiceCommandLineTestInstance, | 383 PrefProxyConfigServiceCommandLineTestInstance, |
| 384 PrefProxyConfigServiceCommandLineTest, | 384 PrefProxyConfigServiceCommandLineTest, |
| 385 testing::ValuesIn(kCommandLineTestParams)); | 385 testing::ValuesIn(kCommandLineTestParams)); |
| 386 | 386 |
| 387 } // namespace | 387 } // namespace |
| OLD | NEW |