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

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

Issue 10916272: Remove HttpAuth::Scheme enum in favor of a string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_proxy_client_socket_pool.h" 5 #include "net/http/http_proxy_client_socket_pool.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 virtual ~HttpProxyClientSocketPoolSpdy2Test() { 99 virtual ~HttpProxyClientSocketPoolSpdy2Test() {
100 } 100 }
101 101
102 void AddAuthToCache() { 102 void AddAuthToCache() {
103 const string16 kFoo(ASCIIToUTF16("foo")); 103 const string16 kFoo(ASCIIToUTF16("foo"));
104 const string16 kBar(ASCIIToUTF16("bar")); 104 const string16 kBar(ASCIIToUTF16("bar"));
105 GURL proxy_url(GetParam() == HTTP ? "http://proxy" : "https://proxy:80"); 105 GURL proxy_url(GetParam() == HTTP ? "http://proxy" : "https://proxy:80");
106 session_->http_auth_cache()->Add(proxy_url, 106 session_->http_auth_cache()->Add(proxy_url,
107 "MyRealm1", 107 "MyRealm1",
108 HttpAuth::AUTH_SCHEME_BASIC, 108 "basic",
109 "Basic realm=MyRealm1", 109 "Basic realm=MyRealm1",
110 AuthCredentials(kFoo, kBar), 110 AuthCredentials(kFoo, kBar),
111 "/"); 111 "/");
112 } 112 }
113 113
114 scoped_refptr<TransportSocketParams> GetTcpParams() { 114 scoped_refptr<TransportSocketParams> GetTcpParams() {
115 if (GetParam() != HTTP) 115 if (GetParam() != HTTP)
116 return scoped_refptr<TransportSocketParams>(); 116 return scoped_refptr<TransportSocketParams>();
117 return ignored_transport_socket_params_; 117 return ignored_transport_socket_params_;
118 } 118 }
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 // Make sure Location header was included and correct. 615 // Make sure Location header was included and correct.
616 std::string location; 616 std::string location;
617 EXPECT_TRUE(headers->IsRedirect(&location)); 617 EXPECT_TRUE(headers->IsRedirect(&location));
618 EXPECT_EQ(location, redirectTarget); 618 EXPECT_EQ(location, redirectTarget);
619 } 619 }
620 } 620 }
621 621
622 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. 622 // It would be nice to also test the timeouts in HttpProxyClientSocketPool.
623 623
624 } // namespace net 624 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth_unittest.cc ('k') | net/http/http_proxy_client_socket_pool_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698