| 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 MockRead(ASYNC, 3, "Content-Length: 10\r\n\r\n"), | 253 MockRead(ASYNC, 3, "Content-Length: 10\r\n\r\n"), |
| 254 MockRead(ASYNC, 4, "0123456789"), | 254 MockRead(ASYNC, 4, "0123456789"), |
| 255 }; | 255 }; |
| 256 scoped_ptr<SpdyFrame> req(ConstructSpdyConnect(NULL, 0, 1)); | 256 scoped_ptr<SpdyFrame> req(ConstructSpdyConnect(NULL, 0, 1)); |
| 257 scoped_ptr<SpdyFrame> rst(ConstructSpdyRstStream(1, CANCEL)); | 257 scoped_ptr<SpdyFrame> rst(ConstructSpdyRstStream(1, CANCEL)); |
| 258 MockWrite spdy_writes[] = { | 258 MockWrite spdy_writes[] = { |
| 259 CreateMockWrite(*req, 0, ASYNC), | 259 CreateMockWrite(*req, 0, ASYNC), |
| 260 CreateMockWrite(*rst, 2, ASYNC), | 260 CreateMockWrite(*rst, 2, ASYNC), |
| 261 }; | 261 }; |
| 262 static const char* const kAuthChallenge[] = { | 262 static const char* const kAuthChallenge[] = { |
| 263 "status", "407 Proxy Authentication Required", | 263 ":status", "407 Proxy Authentication Required", |
| 264 "version", "HTTP/1.1", | 264 ":version", "HTTP/1.1", |
| 265 "proxy-authenticate", "Basic realm=\"MyRealm1\"", | 265 "proxy-authenticate", "Basic realm=\"MyRealm1\"", |
| 266 }; | 266 }; |
| 267 scoped_ptr<SpdyFrame> resp( | 267 scoped_ptr<SpdyFrame> resp( |
| 268 | 268 |
| 269 ConstructSpdyControlFrame(NULL, | 269 ConstructSpdyControlFrame(NULL, |
| 270 0, | 270 0, |
| 271 false, | 271 false, |
| 272 1, | 272 1, |
| 273 LOWEST, | 273 LOWEST, |
| 274 SYN_REPLY, | 274 SYN_REPLY, |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 // HTTPS or SPDY Proxy CONNECT responses are trustworthy | 534 // HTTPS or SPDY Proxy CONNECT responses are trustworthy |
| 535 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv); | 535 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv); |
| 536 EXPECT_TRUE(handle_.is_initialized()); | 536 EXPECT_TRUE(handle_.is_initialized()); |
| 537 EXPECT_TRUE(handle_.socket()); | 537 EXPECT_TRUE(handle_.socket()); |
| 538 } | 538 } |
| 539 } | 539 } |
| 540 | 540 |
| 541 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. | 541 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. |
| 542 | 542 |
| 543 } // namespace net | 543 } // namespace net |
| OLD | NEW |