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

Side by Side Diff: net/http/http_auth_unittest.cc

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_auth.h" 5 #include "net/http/http_auth.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "net/base/net_errors.h" 13 #include "net/base/net_errors.h"
14 #include "net/dns/mock_host_resolver.h" 14 #include "net/dns/mock_host_resolver.h"
15 #include "net/http/http_auth_challenge_tokenizer.h" 15 #include "net/http/http_auth_challenge_tokenizer.h"
16 #include "net/http/http_auth_filter.h" 16 #include "net/http/http_auth_filter.h"
17 #include "net/http/http_auth_handler.h" 17 #include "net/http/http_auth_handler.h"
18 #include "net/http/http_auth_handler_factory.h" 18 #include "net/http/http_auth_handler_factory.h"
19 #include "net/http/http_auth_handler_mock.h" 19 #include "net/http/http_auth_handler_mock.h"
20 #include "net/http/http_auth_scheme.h" 20 #include "net/http/http_auth_scheme.h"
21 #include "net/http/http_response_headers.h" 21 #include "net/http/http_response_headers.h"
22 #include "net/http/http_util.h" 22 #include "net/http/http_util.h"
23 #include "net/http/mock_allow_http_auth_preferences.h" 23 #include "net/http/mock_allow_http_auth_preferences.h"
24 #include "net/log/net_log_with_source.h"
24 #include "net/ssl/ssl_info.h" 25 #include "net/ssl/ssl_info.h"
25 #include "testing/gtest/include/gtest/gtest.h" 26 #include "testing/gtest/include/gtest/gtest.h"
26 27
27 namespace net { 28 namespace net {
28 29
29 namespace { 30 namespace {
30 31
31 HttpAuthHandlerMock* CreateMockHandler(bool connection_based) { 32 HttpAuthHandlerMock* CreateMockHandler(bool connection_based) {
32 HttpAuthHandlerMock* auth_handler = new HttpAuthHandlerMock(); 33 HttpAuthHandlerMock* auth_handler = new HttpAuthHandlerMock();
33 auth_handler->set_connection_based(connection_based); 34 auth_handler->set_connection_based(connection_based);
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 std::string name; 258 std::string name;
258 259
259 name = HttpAuth::GetAuthorizationHeaderName(HttpAuth::AUTH_SERVER); 260 name = HttpAuth::GetAuthorizationHeaderName(HttpAuth::AUTH_SERVER);
260 EXPECT_STREQ("Authorization", name.c_str()); 261 EXPECT_STREQ("Authorization", name.c_str());
261 262
262 name = HttpAuth::GetAuthorizationHeaderName(HttpAuth::AUTH_PROXY); 263 name = HttpAuth::GetAuthorizationHeaderName(HttpAuth::AUTH_PROXY);
263 EXPECT_STREQ("Proxy-Authorization", name.c_str()); 264 EXPECT_STREQ("Proxy-Authorization", name.c_str());
264 } 265 }
265 266
266 } // namespace net 267 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698