| 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 <map> | 5 #include <map> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 ProxyConfigService::ConfigAvailability availability_; | 43 ProxyConfigService::ConfigAvailability availability_; |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 } // namespace | 46 } // namespace |
| 47 | 47 |
| 48 typedef std::map<std::string, std::string> StringMap; | 48 typedef std::map<std::string, std::string> StringMap; |
| 49 | 49 |
| 50 class ProxyConfigServiceAndroidTestBase : public testing::Test { | 50 class ProxyConfigServiceAndroidTestBase : public testing::Test { |
| 51 protected: | 51 protected: |
| 52 // Note that the current thread's message loop is initialized by the test | 52 // Note that the current thread's message loop is initialized by the test |
| 53 // suite (see net/base/net_test_suite.cc). | 53 // suite (see net/test/net_test_suite.cc). |
| 54 ProxyConfigServiceAndroidTestBase(const StringMap& initial_configuration) | 54 ProxyConfigServiceAndroidTestBase(const StringMap& initial_configuration) |
| 55 : configuration_(initial_configuration), | 55 : configuration_(initial_configuration), |
| 56 message_loop_(MessageLoop::current()), | 56 message_loop_(MessageLoop::current()), |
| 57 service_( | 57 service_( |
| 58 message_loop_->message_loop_proxy(), | 58 message_loop_->message_loop_proxy(), |
| 59 message_loop_->message_loop_proxy(), | 59 message_loop_->message_loop_proxy(), |
| 60 base::Bind(&ProxyConfigServiceAndroidTestBase::GetProperty, | 60 base::Bind(&ProxyConfigServiceAndroidTestBase::GetProperty, |
| 61 base::Unretained(this))) {} | 61 base::Unretained(this))) {} |
| 62 | 62 |
| 63 virtual ~ProxyConfigServiceAndroidTestBase() {} | 63 virtual ~ProxyConfigServiceAndroidTestBase() {} |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 TEST_F(ProxyConfigServiceAndroidTest, HttpProxySupercedesSocks) { | 344 TEST_F(ProxyConfigServiceAndroidTest, HttpProxySupercedesSocks) { |
| 345 // SOCKS proxy is ignored if default HTTP proxy defined. | 345 // SOCKS proxy is ignored if default HTTP proxy defined. |
| 346 AddProperty("proxyHost", "defaultproxy.com"); | 346 AddProperty("proxyHost", "defaultproxy.com"); |
| 347 AddProperty("socksProxyHost", "socksproxy.com"); | 347 AddProperty("socksProxyHost", "socksproxy.com"); |
| 348 AddProperty("socksProxyPort", "9000"); | 348 AddProperty("socksProxyPort", "9000"); |
| 349 ProxySettingsChanged(); | 349 ProxySettingsChanged(); |
| 350 TestMapping("http://example.com/", "PROXY defaultproxy.com:80"); | 350 TestMapping("http://example.com/", "PROXY defaultproxy.com:80"); |
| 351 } | 351 } |
| 352 | 352 |
| 353 } // namespace net | 353 } // namespace net |
| OLD | NEW |