OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 &ssl_socket_pool_, | 100 &ssl_socket_pool_, |
101 NULL) { | 101 NULL) { |
102 } | 102 } |
103 | 103 |
104 virtual ~HttpProxyClientSocketPoolTest() { | 104 virtual ~HttpProxyClientSocketPoolTest() { |
105 } | 105 } |
106 | 106 |
107 void AddAuthToCache() { | 107 void AddAuthToCache() { |
108 const string16 kFoo(ASCIIToUTF16("foo")); | 108 const string16 kFoo(ASCIIToUTF16("foo")); |
109 const string16 kBar(ASCIIToUTF16("bar")); | 109 const string16 kBar(ASCIIToUTF16("bar")); |
110 session_->auth_cache()->Add(GURL("http://proxy/"), "MyRealm1", "Basic", | 110 session_->auth_cache()->Add(GURL("http://proxy/"), |
111 "Basic realm=MyRealm1", kFoo, kBar, "/"); | 111 "MyRealm1", |
| 112 HttpAuth::AUTH_SCHEME_BASIC, |
| 113 "Basic realm=MyRealm1", |
| 114 kFoo, |
| 115 kBar, |
| 116 "/"); |
112 } | 117 } |
113 | 118 |
114 scoped_refptr<TCPSocketParams> GetTcpParams() { | 119 scoped_refptr<TCPSocketParams> GetTcpParams() { |
115 if (GetParam() != HTTP) | 120 if (GetParam() != HTTP) |
116 return scoped_refptr<TCPSocketParams>(); | 121 return scoped_refptr<TCPSocketParams>(); |
117 return ignored_tcp_socket_params_; | 122 return ignored_tcp_socket_params_; |
118 } | 123 } |
119 | 124 |
120 scoped_refptr<SSLSocketParams> GetSslParams() { | 125 scoped_refptr<SSLSocketParams> GetSslParams() { |
121 if (GetParam() == HTTP) | 126 if (GetParam() == HTTP) |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 // HTTPS or SPDY Proxy CONNECT responses are trustworthy | 517 // HTTPS or SPDY Proxy CONNECT responses are trustworthy |
513 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv); | 518 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv); |
514 EXPECT_TRUE(handle_.is_initialized()); | 519 EXPECT_TRUE(handle_.is_initialized()); |
515 EXPECT_TRUE(handle_.socket()); | 520 EXPECT_TRUE(handle_.socket()); |
516 } | 521 } |
517 } | 522 } |
518 | 523 |
519 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. | 524 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. |
520 | 525 |
521 } // namespace net | 526 } // namespace net |
OLD | NEW |