OLD | NEW |
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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 ConstructSpdyControlFrame(NULL, | 273 ConstructSpdyControlFrame(NULL, |
274 0, | 274 0, |
275 false, | 275 false, |
276 1, | 276 1, |
277 LOWEST, | 277 LOWEST, |
278 SYN_REPLY, | 278 SYN_REPLY, |
279 CONTROL_FLAG_NONE, | 279 CONTROL_FLAG_NONE, |
280 kAuthChallenge, | 280 kAuthChallenge, |
281 arraysize(kAuthChallenge))); | 281 arraysize(kAuthChallenge))); |
282 MockRead spdy_reads[] = { | 282 MockRead spdy_reads[] = { |
283 CreateMockWrite(*resp, 1, ASYNC), | 283 CreateMockRead(*resp, 1, ASYNC), |
284 MockRead(ASYNC, 0, 3) | 284 MockRead(ASYNC, 0, 3) |
285 }; | 285 }; |
286 | 286 |
287 Initialize(reads, arraysize(reads), writes, arraysize(writes), | 287 Initialize(reads, arraysize(reads), writes, arraysize(writes), |
288 spdy_reads, arraysize(spdy_reads), spdy_writes, | 288 spdy_reads, arraysize(spdy_reads), spdy_writes, |
289 arraysize(spdy_writes)); | 289 arraysize(spdy_writes)); |
290 | 290 |
291 data_->StopAfter(4); | 291 data_->StopAfter(4); |
292 int rv = handle_.Init("a", GetTunnelParams(), LOW, callback_.callback(), | 292 int rv = handle_.Init("a", GetTunnelParams(), LOW, callback_.callback(), |
293 &pool_, BoundNetLog()); | 293 &pool_, BoundNetLog()); |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 // HTTPS or SPDY Proxy CONNECT responses are trustworthy | 539 // HTTPS or SPDY Proxy CONNECT responses are trustworthy |
540 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv); | 540 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv); |
541 EXPECT_TRUE(handle_.is_initialized()); | 541 EXPECT_TRUE(handle_.is_initialized()); |
542 EXPECT_TRUE(handle_.socket()); | 542 EXPECT_TRUE(handle_.socket()); |
543 } | 543 } |
544 } | 544 } |
545 | 545 |
546 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. | 546 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. |
547 | 547 |
548 } // namespace net | 548 } // namespace net |
OLD | NEW |