Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: net/proxy/proxy_config_unittest.cc

Issue 113811: Adding socks4 support for chromium. tested for windows and linux.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: final patch Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/proxy/proxy_config.cc ('k') | net/proxy/proxy_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.h" 5 #include "net/proxy/proxy_config.h"
6 #include "net/proxy/proxy_config_service_common_unittest.h" 6 #include "net/proxy/proxy_config_service_common_unittest.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace { 9 namespace {
10 static void ExpectProxyServerEquals(const char* expectation, 10 static void ExpectProxyServerEquals(const char* expectation,
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 { 163 {
164 "ftp=ftp1 ; ftp=ftp2 ; ftp=ftp3", 164 "ftp=ftp1 ; ftp=ftp2 ; ftp=ftp3",
165 165
166 net::ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME, 166 net::ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME,
167 NULL, 167 NULL,
168 NULL, 168 NULL,
169 NULL, 169 NULL,
170 "ftp3:80", 170 "ftp3:80",
171 }, 171 },
172 172
173 // Only socks proxy present, others being blank.
174 { // NOLINT
175 "socks=foopy",
176
177 net::ProxyConfig::ProxyRules::TYPE_SINGLE_PROXY,
178 "socks4://foopy:1080",
179 NULL,
180 NULL,
181 NULL,
182 },
183
173 // Include unsupported schemes -- they are discarded. 184 // Include unsupported schemes -- they are discarded.
174 { 185 {
175 "crazy=foopy ; foo=bar ; https=myhttpsproxy", 186 "crazy=foopy ; foo=bar ; https=myhttpsproxy",
176 187
177 net::ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME, 188 net::ProxyConfig::ProxyRules::TYPE_PROXY_PER_SCHEME,
178 NULL, 189 NULL,
179 NULL, 190 NULL,
180 "myhttpsproxy:80", 191 "myhttpsproxy:80",
181 NULL, 192 NULL,
182 }, 193 },
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 }; 235 };
225 236
226 net::ProxyConfig config; 237 net::ProxyConfig config;
227 238
228 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { 239 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
229 config.ParseNoProxyList(tests[i].proxy_bypass_input); 240 config.ParseNoProxyList(tests[i].proxy_bypass_input);
230 EXPECT_EQ(tests[i].flattened_output, 241 EXPECT_EQ(tests[i].flattened_output,
231 net::FlattenProxyBypass(config.proxy_bypass)); 242 net::FlattenProxyBypass(config.proxy_bypass));
232 } 243 }
233 } 244 }
OLDNEW
« no previous file with comments | « net/proxy/proxy_config.cc ('k') | net/proxy/proxy_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698