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

Issue 1705001: Unit tests for HttpAuthHandlerNegotiate (Closed)

Created:
10 years, 8 months ago by cbentzel
Modified:
5 years, 7 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Adds unit tests for how HttpAuthHandlerNegotiate creates SPNs. BUG=None TEST=net_unittests --gtest_filter="*HttpAuthHandlerNegotiate*" Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=45821

Patch Set 1 #

Patch Set 2 : Style fixes. #

Patch Set 3 : Formatting fixes for MockHostResolver. #

Patch Set 4 : Handle error case in CreateCanonicalAddressList. #

Patch Set 5 : Remove extra newlines. #

Total comments: 11

Patch Set 6 : Some fixes. #

Patch Set 7 : CreateSPN and SPN are Windows only. #

Total comments: 2

Patch Set 8 : Naming fixes. #

Patch Set 9 : AddRuleForCanonicalName becomes AddRuleWithCanonicalName #

Total comments: 1

Patch Set 10 : Changes to how literal ipv4+ipv6 are used #

Patch Set 11 : Format and comment changes. #

Patch Set 12 : More cleanup. #

Patch Set 13 : Build fix for non-windows. #

Total comments: 4

Patch Set 14 : Respond to eroman's concerns. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+242 lines, -34 lines) Patch
M net/base/address_list.h View 1 chunk +13 lines, -2 lines 0 comments Download
M net/base/address_list.cc View 10 11 3 chunks +39 lines, -11 lines 0 comments Download
M net/base/mock_host_resolver.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +19 lines, -5 lines 0 comments Download
M net/base/mock_host_resolver.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +67 lines, -13 lines 0 comments Download
M net/http/http_auth_handler_negotiate.h View 1 2 3 4 5 6 2 chunks +6 lines, -2 lines 0 comments Download
A net/http/http_auth_handler_negotiate_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +96 lines, -0 lines 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M net/socket/socks_client_socket_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
cbentzel
10 years, 8 months ago (2010-04-20 19:20:37 UTC) #1
ahendrickson
http://codereview.chromium.org/1705001/diff/8001/9004 File net/http/http_auth_handler_negotiate_unittest.cc (right): http://codereview.chromium.org/1705001/diff/8001/9004#newcode24 net/http/http_auth_handler_negotiate_unittest.cc:24: MockSSPILibrary mock_library; Does mock_library need to persist after CreateHandler() ...
10 years, 8 months ago (2010-04-20 19:37:06 UTC) #2
cbentzel
http://codereview.chromium.org/1705001/diff/8001/9004 File net/http/http_auth_handler_negotiate_unittest.cc (right): http://codereview.chromium.org/1705001/diff/8001/9004#newcode24 net/http/http_auth_handler_negotiate_unittest.cc:24: MockSSPILibrary mock_library; On 2010/04/20 19:37:06, ahendrickson wrote: > Does ...
10 years, 8 months ago (2010-04-20 20:19:28 UTC) #3
wtc
LGTM, with the following comments. eroman should review the changes to mock_host_resolver.{h,cc}. I think the ...
10 years, 8 months ago (2010-04-20 21:25:03 UTC) #4
cbentzel
I made the suggested changes, except for getting rid of the addition rule resolver type. ...
10 years, 8 months ago (2010-04-21 14:07:31 UTC) #5
eroman
Comments on mock host resolver: http://codereview.chromium.org/1705001/diff/19001/20001 File net/base/mock_host_resolver.cc (right): http://codereview.chromium.org/1705001/diff/19001/20001#newcode50 net/base/mock_host_resolver.cc:50: reinterpret_cast<unsigned char*>(&address), &num_components); This ...
10 years, 8 months ago (2010-04-23 19:59:45 UTC) #6
cbentzelold
On 2010/04/23 19:59:45, eroman wrote: > Comments on mock host resolver: > > http://codereview.chromium.org/1705001/diff/19001/20001 > ...
10 years, 8 months ago (2010-04-23 20:12:40 UTC) #7
cbentzel
Eric - this is ready for re-review. Thanks.
10 years, 8 months ago (2010-04-27 16:50:46 UTC) #8
eroman
LGTM http://codereview.chromium.org/1705001/diff/5006/30004 File net/base/mock_host_resolver.cc (right): http://codereview.chromium.org/1705001/diff/5006/30004#newcode52 net/base/mock_host_resolver.cc:52: host.c_str(), host_comp, ipv4_addr, &num_components); nit: my pet peeve ...
10 years, 8 months ago (2010-04-27 19:55:22 UTC) #9
cbentzel
10 years, 8 months ago (2010-04-28 14:34:33 UTC) #10
I uploaded the latest patchset which I'll commit.

http://codereview.chromium.org/1705001/diff/5006/30004
File net/base/mock_host_resolver.cc (right):

http://codereview.chromium.org/1705001/diff/5006/30004#newcode239
net/base/mock_host_resolver.cc:239: bool matches_flags = (r->host_resolver_flags
& host_resolver_flags) ==
On 2010/04/27 19:55:23, eroman wrote:
> I am finding this hard to grok.
> 
> Would it be possible to write this in terms of boolean logic similar to
> matches_address_family?

The logic here was essentially that r->host_resolver_flags might have multiple
additional bits that host_resolver_flags does not have, which is why I did the
bitwise-and followed by equality. I will document what this is doing.

If you'd still like me to simplify the logic (since there's only one effective
bit flag currently), let me know and I'll do it in a follow-up CL.

Powered by Google App Engine
This is Rietveld 408576698