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

Unified Diff: net/proxy/proxy_server_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/proxy/proxy_server.cc ('k') | net/socket/socks_client_socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_server_unittest.cc
===================================================================
--- net/proxy/proxy_server_unittest.cc (revision 19002)
+++ net/proxy/proxy_server_unittest.cc (working copy)
@@ -125,6 +125,26 @@
"foopy:10",
"SOCKS5 foopy:10"
},
+
+ // SOCKS proxy URIs (should default to SOCKS4)
+ {
+ "socks://foopy", // No port.
+ "socks4://foopy:1080",
+ net::ProxyServer::SCHEME_SOCKS4,
+ "foopy",
+ 1080,
+ "foopy:1080",
+ "SOCKS foopy:1080"
+ },
+ {
+ "socks://foopy:10",
+ "socks4://foopy:10",
+ net::ProxyServer::SCHEME_SOCKS4,
+ "foopy",
+ 10,
+ "foopy:10",
+ "SOCKS foopy:10"
+ },
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
@@ -162,7 +182,6 @@
" ",
"dddf:", // not a valid port
"dddd:d", // not a valid port
- "socks://foopy", // not a valid scheme (needs to be socks4 or sock5).
"http://", // not a valid host/port.
"direct://xyz", // direct is not allowed a host/port.
"http:/", // ambiguous, but will fail because of bad port.
« no previous file with comments | « net/proxy/proxy_server.cc ('k') | net/socket/socks_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698