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

Issue 155618: Use manually constructed IPv6 socket addresses for tests, rather than system ... (Closed)

Created:
11 years, 5 months ago by eroman
Modified:
9 years, 6 months ago
Reviewers:
arindam, willchan no longer on Chromium
CC:
chromium-reviews_googlegroups.com, darin (slow to review), brettw, willchan no longer on Chromium
Visibility:
Public.

Description

Use manually constructed IPv6 socket addresses for tests, rather than system created ones. The advantage is that GURL's parsing of IPv6 addresses works on all systems, whereas getaddrinfo(ipv6_literal) only succeeds on IPv6 enabled systems. This allows the tests to run consistently on all systems, including our own WinXP buildbots (which do not support IPv6). BUG=http://crbug.com/16452 TEST=[net_unittests] SOCKS5ClientSocketTest.IPv6Domain, SOCKSClientSocketTest.SOCKS4AIfDomainInIPv6 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=21053

Patch Set 1 #

Patch Set 2 : Add missing DEPS file #

Patch Set 3 : Add some DCHECKs to check for empty replacements #

Patch Set 4 : Fix AddRuleWithLatency() #

Total comments: 4

Patch Set 5 : Address (one of) willchan's comments #

Patch Set 6 : sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -43 lines) Patch
M DEPS View 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M net/base/address_list.h View 1 2 3 4 5 3 chunks +9 lines, -0 lines 0 comments Download
M net/base/address_list.cc View 1 2 3 4 5 1 chunk +19 lines, -0 lines 0 comments Download
M net/base/host_resolver_impl_unittest.cc View 1 2 3 4 5 1 chunk +6 lines, -1 line 0 comments Download
M net/base/mock_host_resolver.h View 1 2 3 4 5 2 chunks +8 lines, -0 lines 0 comments Download
M net/base/mock_host_resolver.cc View 1 2 3 4 5 4 chunks +80 lines, -28 lines 0 comments Download
M net/socket/socks5_client_socket_unittest.cc View 1 2 3 4 5 2 chunks +2 lines, -12 lines 0 comments Download
M net/socket/socks_client_socket_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
eroman
@arindam: please review the changes to the SOCKS unit tests. @willchan: please review everything else.
11 years, 5 months ago (2009-07-16 03:32:44 UTC) #1
willchan no longer on Chromium
lgtm http://codereview.chromium.org/155618/diff/29/1034 File net/base/address_list.h (right): http://codereview.chromium.org/155618/diff/29/1034#newcode48 Line 48: static AddressList CreateIPv6Address(unsigned char data[16]); I would ...
11 years, 5 months ago (2009-07-17 23:06:17 UTC) #2
eroman
11 years, 5 months ago (2009-07-18 07:31:56 UTC) #3
http://codereview.chromium.org/155618/diff/29/1034
File net/base/address_list.h (right):

http://codereview.chromium.org/155618/diff/29/1034#newcode48
Line 48: static AddressList CreateIPv6Address(unsigned char data[16]);
On 2009/07/17 23:06:17, willchan wrote:
> I would get rid of the 16 because the compiler will ignore it.  You could pass
> in a char* and it'd accept it.  If you indeed want to force the compiler to
only
> accept an array, you should use (unsigned char (&) data[16]) as your
parameter.

I would rather leave the [16] -- I find it convenient as a form of
documentation.

http://codereview.chromium.org/155618/diff/29/1031
File net/base/mock_host_resolver.h (right):

http://codereview.chromium.org/155618/diff/29/1031#newcode106
Line 106: // Fills |addrlist| with a socket address for |host| which should be
an
On 2009/07/17 23:06:17, willchan wrote:
> Any reason to put this in the .h file?  It seems like an implementation
detail;
> how about putting it in an anonymous namespace in the .cc file?

Done.

Powered by Google App Engine
This is Rietveld 408576698