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

Issue 501112: Add two more unit tests for SOCKS5:... (Closed)

Created:
11 years ago by eroman
Modified:
9 years, 6 months ago
Reviewers:
wtc
CC:
chromium-reviews_googlegroups.com, darin (slow to review), Paweł Hajdan Jr.
Visibility:
Public.

Description

Add two more unit tests for SOCKS5: * Check that connecting again after having disconnected works. * Check that trying to connect with a very large hostname fails. Also removes some unused code from socks_client_socket.cc. BUG=NONE Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=35008

Patch Set 1 #

Total comments: 1

Patch Set 2 : add the <algorithm> header as I use std::fill_n() #

Total comments: 3

Patch Set 3 : Address wtc's comment #

Patch Set 4 : Add back a header file #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -22 lines) Patch
M net/socket/socks5_client_socket.cc View 1 2 3 3 chunks +7 lines, -5 lines 0 comments Download
M net/socket/socks5_client_socket_unittest.cc View 1 2 3 3 chunks +40 lines, -17 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
eroman
http://codereview.chromium.org/501112/diff/1/3 File net/socket/socks5_client_socket.cc (right): http://codereview.chromium.org/501112/diff/1/3#newcode183 net/socket/socks5_client_socket.cc:183: if (0xFF < host_request_info_.hostname().size()) I moved this check earlier, ...
11 years ago (2009-12-18 08:19:42 UTC) #1
wtc
LGTM. http://codereview.chromium.org/501112/diff/2001/3001 File net/socket/socks5_client_socket_unittest.cc (right): http://codereview.chromium.org/501112/diff/2001/3001#newcode193 net/socket/socks5_client_socket_unittest.cc:193: // Test that we fail trying to connect ...
11 years ago (2009-12-18 21:52:45 UTC) #2
eroman
11 years ago (2009-12-18 22:31:22 UTC) #3
http://codereview.chromium.org/501112/diff/2001/3001
File net/socket/socks5_client_socket_unittest.cc (right):

http://codereview.chromium.org/501112/diff/2001/3001#newcode203
net/socket/socks5_client_socket_unittest.cc:203: large_host_name, 80));
On 2009/12/18 21:52:46, wtc wrote:
> Just curious -- what's this 80 here?

80 is the port number.

<large_host_name>:80 is the target server, which are are asking the SOCKS server
to connect us to.

For this test, the port number doesn't matter.

Powered by Google App Engine
This is Rietveld 408576698