| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_config_service_win.h" | 5 #include "net/proxy/proxy_config_service_win.h" |
| 6 | 6 |
| 7 #include "net/base/net_errors.h" | 7 #include "net/base/net_errors.h" |
| 8 #include "net/proxy/proxy_config.h" | 8 #include "net/proxy/proxy_config.h" |
| 9 #include "net/proxy/proxy_config_service_common_unittest.h" | 9 #include "net/proxy/proxy_config_service_common_unittest.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 }, | 101 }, |
| 102 | 102 |
| 103 // Expected result. | 103 // Expected result. |
| 104 false, // auto_detect | 104 false, // auto_detect |
| 105 GURL(), // pac_url | 105 GURL(), // pac_url |
| 106 MakeProxyPerSchemeRules("www.google.com:80", "www.foo.com:110", ""), | 106 MakeProxyPerSchemeRules("www.google.com:80", "www.foo.com:110", ""), |
| 107 "", // proxy_bypass_list | 107 "", // proxy_bypass_list |
| 108 false, // bypass_local_names | 108 false, // bypass_local_names |
| 109 }, | 109 }, |
| 110 | 110 |
| 111 // SOCKS proxy configuration |
| 112 { |
| 113 { // Input. |
| 114 FALSE, // fAutoDetect |
| 115 NULL, // lpszAutoConfigUrl |
| 116 L"http=www.google.com:80;https=www.foo.com:110;" |
| 117 L"ftp=ftpproxy:20;socks=foopy:130", // lpszProxy |
| 118 NULL, // lpszProxy_bypass |
| 119 }, |
| 120 |
| 121 // Expected result. |
| 122 false, // auto_detect |
| 123 GURL(), // pac_url |
| 124 MakeProxyPerSchemeRules("www.google.com:80", "www.foo.com:110", |
| 125 "ftpproxy:20", "foopy:130"), |
| 126 "", // proxy_bypass_list |
| 127 false, // bypass_local_names |
| 128 }, |
| 129 |
| 111 // Bypass local names. | 130 // Bypass local names. |
| 112 { | 131 { |
| 113 { // Input. | 132 { // Input. |
| 114 TRUE, // fAutoDetect | 133 TRUE, // fAutoDetect |
| 115 NULL, // lpszAutoConfigUrl | 134 NULL, // lpszAutoConfigUrl |
| 116 NULL, // lpszProxy | 135 NULL, // lpszProxy |
| 117 L"<local>", // lpszProxy_bypass | 136 L"<local>", // lpszProxy_bypass |
| 118 }, | 137 }, |
| 119 | 138 |
| 120 true, // auto_detect | 139 true, // auto_detect |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 EXPECT_EQ(tests[i].auto_detect, config.auto_detect); | 186 EXPECT_EQ(tests[i].auto_detect, config.auto_detect); |
| 168 EXPECT_EQ(tests[i].pac_url, config.pac_url); | 187 EXPECT_EQ(tests[i].pac_url, config.pac_url); |
| 169 EXPECT_EQ(tests[i].proxy_bypass_list, | 188 EXPECT_EQ(tests[i].proxy_bypass_list, |
| 170 FlattenProxyBypass(config.proxy_bypass)); | 189 FlattenProxyBypass(config.proxy_bypass)); |
| 171 EXPECT_EQ(tests[i].bypass_local_names, config.proxy_bypass_local_names); | 190 EXPECT_EQ(tests[i].bypass_local_names, config.proxy_bypass_local_names); |
| 172 EXPECT_EQ(tests[i].proxy_rules, config.proxy_rules); | 191 EXPECT_EQ(tests[i].proxy_rules, config.proxy_rules); |
| 173 } | 192 } |
| 174 } | 193 } |
| 175 | 194 |
| 176 } // namespace net | 195 } // namespace net |
| OLD | NEW |