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

Issue 139009: Tests for socks4/4a implementation. (Closed)

Created:
11 years, 6 months ago by Arindam
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, darin (slow to review)
Visibility:
Public.

Description

Tests for socks4/4a implementation. Refactoring of void BuildHandshakeWriteBuffer() to const std::string BuildHandshakeWriteBuffer() const,and removing private members handshake_buf_len_ and buffer_len_ (since buffer_ is now std::string, buffer_.size()) is more than sufficient for buffer size. TEST=unittests BUG=469 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=19474

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 9

Patch Set 3 : passing HostResolver as a constructor argument #

Patch Set 4 : adding testcase when hostname DNS resolves to IPv6 #

Total comments: 2

Patch Set 5 : changing to mock sockets, adding more tests #

Total comments: 42

Patch Set 6 : no more IO_PENDING loops #

Total comments: 15

Patch Set 7 : snapshot #

Patch Set 8 : refactoring #

Total comments: 21

Patch Set 9 : fixed FailedSocketRead test #

Total comments: 4

Patch Set 10 : '' #

Patch Set 11 : repo-change fix #

Patch Set 12 : uint fix #

Patch Set 13 : scoped_refptr #

Unified diffs Side-by-side diffs Delta from patch set Stats (+439 lines, -150 lines) Patch
M net/net.gyp View 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M net/socket/socket_test_util.h View 6 7 8 9 10 11 12 2 chunks +85 lines, -0 lines 0 comments Download
M net/socket/socket_test_util.cc View 6 7 8 9 10 11 12 2 chunks +1 line, -89 lines 0 comments Download
M net/socket/socks_client_socket.h View 6 7 8 9 10 11 12 5 chunks +12 lines, -10 lines 0 comments Download
M net/socket/socks_client_socket.cc View 8 9 10 11 12 7 chunks +49 lines, -51 lines 0 comments Download
A net/socket/socks_client_socket_unittest.cc View 6 7 8 9 10 11 12 1 chunk +291 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Arindam
11 years, 6 months ago (2009-06-19 20:47:38 UTC) #1
willchan no longer on Chromium
Drive by style nits. Not doing a full review, letting eroman take care of that. ...
11 years, 6 months ago (2009-06-19 21:04:54 UTC) #2
Arindam
Added another test for a case when the hostname DNS resolves to IPv6 http://codereview.chromium.org/139009/diff/3/1003 File ...
11 years, 6 months ago (2009-06-21 00:24:32 UTC) #3
willchan no longer on Chromium
http://codereview.chromium.org/139009/diff/3/1003 File net/base/socks_client_socket_unittest.cc (right): http://codereview.chromium.org/139009/diff/3/1003#newcode270 Line 270: // EXPECT_EQ(user_sock_->socks_version_, On 2009/06/21 00:24:32, Arindam wrote: > ...
11 years, 6 months ago (2009-06-21 01:39:58 UTC) #4
eroman
http://codereview.chromium.org/139009/diff/3003/3004 File net/base/socks_client_socket_unittest.cc (right): http://codereview.chromium.org/139009/diff/3003/3004#newcode100 Line 100: sock = ListenSocket::Listen("127.0.0.1", port, this); Please use mock ...
11 years, 6 months ago (2009-06-21 03:30:12 UTC) #5
Arindam
I moved MockTCPClientSocket from socket_test_util.cc to socket_test_util.h so that it can be used directly. Also ...
11 years, 6 months ago (2009-06-22 15:46:27 UTC) #6
eroman
http://codereview.chromium.org/139009/diff/3006/3009 File net/base/socket_test_util.h (right): http://codereview.chromium.org/139009/diff/3006/3009#newcode207 Line 207: class MockClientSocket : public net::SSLClientSocket { I assume ...
11 years, 6 months ago (2009-06-23 01:06:26 UTC) #7
eroman
Great start on the unit-tests. Including the second batch of comments. http://codereview.chromium.org/139009/diff/3006/3007 File net/base/socks_client_socket_unittest.cc (right): ...
11 years, 6 months ago (2009-06-23 01:23:03 UTC) #8
Arindam
Finished with the changes suggested. also moved the unittest file around. http://codereview.chromium.org/139009/diff/3006/3009 File net/base/socket_test_util.h (right): ...
11 years, 6 months ago (2009-06-23 12:15:32 UTC) #9
eroman
http://codereview.chromium.org/139009/diff/5001/4006 File net/socket/socks_client_socket.h (right): http://codereview.chromium.org/139009/diff/5001/4006#newcode125 Line 125: FRIEND_TEST(SOCKSClientSocketTest, CompleteHandshake); Move these declarations to to top ...
11 years, 6 months ago (2009-06-23 23:58:12 UTC) #10
Arindam
fixed most comments. Also refactored BuildHandshakeWriteBuffer() as willchan suggested. http://codereview.chromium.org/139009/diff/5001/4006 File net/socket/socks_client_socket.h (right): http://codereview.chromium.org/139009/diff/5001/4006#newcode125 Line ...
11 years, 6 months ago (2009-06-24 14:50:08 UTC) #11
eroman
http://codereview.chromium.org/139009/diff/5008/5013 File net/socket/socks_client_socket.cc (right): http://codereview.chromium.org/139009/diff/5008/5013#newcode246 Line 246: struct sockaddr_in *ipv4_host = nit: "struct sockaddr_in* ipv4_host" ...
11 years, 6 months ago (2009-06-24 18:14:26 UTC) #12
Arindam
worked on the comments. Also including fixed FailedHandshakeRead test and corresponding changes for the sockets ...
11 years, 6 months ago (2009-06-24 19:14:02 UTC) #13
eroman
LGTM http://codereview.chromium.org/139009/diff/5019/4028 File net/socket/socks_client_socket_unittest.cc (right): http://codereview.chromium.org/139009/diff/5019/4028#newcode42 Line 42: scoped_ptr<HostResolver> host_resolver_; Why not simply make this ...
11 years, 6 months ago (2009-06-24 20:06:38 UTC) #14
Arindam
fixed. http://codereview.chromium.org/139009/diff/5019/4028 File net/socket/socks_client_socket_unittest.cc (right): http://codereview.chromium.org/139009/diff/5019/4028#newcode42 Line 42: scoped_ptr<HostResolver> host_resolver_; On 2009/06/24 20:06:38, eroman wrote: ...
11 years, 6 months ago (2009-06-24 20:20:26 UTC) #15
eroman
LGTM
11 years, 6 months ago (2009-06-24 20:34:12 UTC) #16
Arindam
gcc/mac compilations fix.
11 years, 6 months ago (2009-06-27 02:28:10 UTC) #17
eroman
11 years, 6 months ago (2009-06-27 02:44:43 UTC) #18
lgtm

Powered by Google App Engine
This is Rietveld 408576698