| 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 "net/proxy/proxy_info.h" |
| 6 |
| 5 #include "net/base/net_errors.h" | 7 #include "net/base/net_errors.h" |
| 8 #include "net/log/net_log_with_source.h" |
| 6 #include "net/proxy/proxy_config.h" | 9 #include "net/proxy/proxy_config.h" |
| 7 #include "net/proxy/proxy_info.h" | |
| 8 #include "net/proxy/proxy_list.h" | 10 #include "net/proxy/proxy_list.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 12 |
| 11 namespace net { | 13 namespace net { |
| 12 namespace { | 14 namespace { |
| 13 | 15 |
| 14 TEST(ProxyInfoTest, ProxyInfoIsDirectOnly) { | 16 TEST(ProxyInfoTest, ProxyInfoIsDirectOnly) { |
| 15 // Test the is_direct_only() predicate. | 17 // Test the is_direct_only() predicate. |
| 16 ProxyInfo info; | 18 ProxyInfo info; |
| 17 | 19 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 info.OverrideProxyList(proxy_list); | 54 info.OverrideProxyList(proxy_list); |
| 53 EXPECT_EQ(99, info.config_id_); | 55 EXPECT_EQ(99, info.config_id_); |
| 54 EXPECT_EQ("PROXY foo.com:80", info.proxy_list().ToPacString()); | 56 EXPECT_EQ("PROXY foo.com:80", info.proxy_list().ToPacString()); |
| 55 proxy_list.Set("http://bar.com"); | 57 proxy_list.Set("http://bar.com"); |
| 56 info.UseProxyList(proxy_list); | 58 info.UseProxyList(proxy_list); |
| 57 EXPECT_EQ(0, info.config_id_); | 59 EXPECT_EQ(0, info.config_id_); |
| 58 EXPECT_EQ("PROXY bar.com:80", info.proxy_list().ToPacString()); | 60 EXPECT_EQ("PROXY bar.com:80", info.proxy_list().ToPacString()); |
| 59 } | 61 } |
| 60 | 62 |
| 61 } // namespace net | 63 } // namespace net |
| OLD | NEW |