| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 private: | 91 private: |
| 92 scoped_refptr<PrefProxyConfigTracker> proxy_config_tracker_; | 92 scoped_refptr<PrefProxyConfigTracker> proxy_config_tracker_; |
| 93 BrowserThread ui_thread_; | 93 BrowserThread ui_thread_; |
| 94 BrowserThread io_thread_; | 94 BrowserThread io_thread_; |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 class PrefProxyConfigServiceTest | 97 class PrefProxyConfigServiceTest |
| 98 : public PrefProxyConfigServiceTestBase<testing::Test> { | 98 : public PrefProxyConfigServiceTestBase<testing::Test> { |
| 99 protected: | 99 protected: |
| 100 virtual void SetUp() { | 100 virtual void SetUp() { |
| 101 pref_service_.reset(new TestingPrefService()); | 101 pref_service_.reset(TestingPrefService::CreateTestingPrefService()); |
| 102 Init(pref_service_.get()); | 102 Init(pref_service_.get()); |
| 103 } | 103 } |
| 104 | 104 |
| 105 scoped_ptr<TestingPrefService> pref_service_; | 105 scoped_ptr<TestingPrefService> pref_service_; |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 TEST_F(PrefProxyConfigServiceTest, BaseConfiguration) { | 108 TEST_F(PrefProxyConfigServiceTest, BaseConfiguration) { |
| 109 net::ProxyConfig actual_config; | 109 net::ProxyConfig actual_config; |
| 110 proxy_config_service_->GetLatestProxyConfig(&actual_config); | 110 proxy_config_service_->GetLatestProxyConfig(&actual_config); |
| 111 EXPECT_EQ(GURL(kFixedPacUrl), actual_config.pac_url()); | 111 EXPECT_EQ(GURL(kFixedPacUrl), actual_config.pac_url()); |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 net::ProxyRulesExpectation::Empty(), | 377 net::ProxyRulesExpectation::Empty(), |
| 378 }, | 378 }, |
| 379 }; | 379 }; |
| 380 | 380 |
| 381 INSTANTIATE_TEST_CASE_P( | 381 INSTANTIATE_TEST_CASE_P( |
| 382 PrefProxyConfigServiceCommandLineTestInstance, | 382 PrefProxyConfigServiceCommandLineTestInstance, |
| 383 PrefProxyConfigServiceCommandLineTest, | 383 PrefProxyConfigServiceCommandLineTest, |
| 384 testing::ValuesIn(kCommandLineTestParams)); | 384 testing::ValuesIn(kCommandLineTestParams)); |
| 385 | 385 |
| 386 } // namespace | 386 } // namespace |
| OLD | NEW |