| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
| 6 | 6 |
| 7 #include <math.h> // ceil | 7 #include <math.h> // ceil |
| 8 #include <stdarg.h> | 8 #include <stdarg.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 7499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7510 | 7510 |
| 7511 scoped_refptr<HttpNetworkSession> SetupSessionForGroupNameTests( | 7511 scoped_refptr<HttpNetworkSession> SetupSessionForGroupNameTests( |
| 7512 NextProto next_proto, | 7512 NextProto next_proto, |
| 7513 SpdySessionDependencies* session_deps_) { | 7513 SpdySessionDependencies* session_deps_) { |
| 7514 scoped_refptr<HttpNetworkSession> session(CreateSession(session_deps_)); | 7514 scoped_refptr<HttpNetworkSession> session(CreateSession(session_deps_)); |
| 7515 | 7515 |
| 7516 base::WeakPtr<HttpServerProperties> http_server_properties = | 7516 base::WeakPtr<HttpServerProperties> http_server_properties = |
| 7517 session->http_server_properties(); | 7517 session->http_server_properties(); |
| 7518 http_server_properties->SetAlternateProtocol( | 7518 http_server_properties->SetAlternateProtocol( |
| 7519 HostPortPair("host.with.alternate", 80), 443, | 7519 HostPortPair("host.with.alternate", 80), 443, |
| 7520 AlternateProtocolFromNextProto(next_proto)); | 7520 AlternateProtocolFromNextProto(next_proto), 1); |
| 7521 | 7521 |
| 7522 return session; | 7522 return session; |
| 7523 } | 7523 } |
| 7524 | 7524 |
| 7525 int GroupNameTransactionHelper( | 7525 int GroupNameTransactionHelper( |
| 7526 const std::string& url, | 7526 const std::string& url, |
| 7527 const scoped_refptr<HttpNetworkSession>& session) { | 7527 const scoped_refptr<HttpNetworkSession>& session) { |
| 7528 HttpRequestInfo request; | 7528 HttpRequestInfo request; |
| 7529 request.method = "GET"; | 7529 request.method = "GET"; |
| 7530 request.url = GURL(url); | 7530 request.url = GURL(url); |
| (...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8422 ASSERT_TRUE(response->headers.get() != NULL); | 8422 ASSERT_TRUE(response->headers.get() != NULL); |
| 8423 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); | 8423 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
| 8424 EXPECT_FALSE(response->was_fetched_via_spdy); | 8424 EXPECT_FALSE(response->was_fetched_via_spdy); |
| 8425 EXPECT_FALSE(response->was_npn_negotiated); | 8425 EXPECT_FALSE(response->was_npn_negotiated); |
| 8426 | 8426 |
| 8427 std::string response_data; | 8427 std::string response_data; |
| 8428 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data)); | 8428 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data)); |
| 8429 EXPECT_EQ("hello world", response_data); | 8429 EXPECT_EQ("hello world", response_data); |
| 8430 | 8430 |
| 8431 ASSERT_TRUE(http_server_properties.HasAlternateProtocol(http_host_port_pair)); | 8431 ASSERT_TRUE(http_server_properties.HasAlternateProtocol(http_host_port_pair)); |
| 8432 const PortAlternateProtocolPair alternate = | 8432 const AlternateProtocolInfo alternate = |
| 8433 http_server_properties.GetAlternateProtocol(http_host_port_pair); | 8433 http_server_properties.GetAlternateProtocol(http_host_port_pair); |
| 8434 PortAlternateProtocolPair expected_alternate; | 8434 AlternateProtocolInfo expected_alternate( |
| 8435 expected_alternate.port = 443; | 8435 443, AlternateProtocolFromNextProto(GetParam()), 1); |
| 8436 expected_alternate.protocol = AlternateProtocolFromNextProto(GetParam()); | |
| 8437 EXPECT_TRUE(expected_alternate.Equals(alternate)); | 8436 EXPECT_TRUE(expected_alternate.Equals(alternate)); |
| 8438 } | 8437 } |
| 8439 | 8438 |
| 8440 TEST_P(HttpNetworkTransactionTest, | 8439 TEST_P(HttpNetworkTransactionTest, |
| 8441 MarkBrokenAlternateProtocolAndFallback) { | 8440 MarkBrokenAlternateProtocolAndFallback) { |
| 8442 session_deps_.use_alternate_protocols = true; | 8441 session_deps_.use_alternate_protocols = true; |
| 8443 | 8442 |
| 8444 HttpRequestInfo request; | 8443 HttpRequestInfo request; |
| 8445 request.method = "GET"; | 8444 request.method = "GET"; |
| 8446 request.url = GURL("http://www.google.com/"); | 8445 request.url = GURL("http://www.google.com/"); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 8462 | 8461 |
| 8463 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); | 8462 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
| 8464 | 8463 |
| 8465 base::WeakPtr<HttpServerProperties> http_server_properties = | 8464 base::WeakPtr<HttpServerProperties> http_server_properties = |
| 8466 session->http_server_properties(); | 8465 session->http_server_properties(); |
| 8467 // Port must be < 1024, or the header will be ignored (since initial port was | 8466 // Port must be < 1024, or the header will be ignored (since initial port was |
| 8468 // port 80 (another restricted port). | 8467 // port 80 (another restricted port). |
| 8469 http_server_properties->SetAlternateProtocol( | 8468 http_server_properties->SetAlternateProtocol( |
| 8470 HostPortPair::FromURL(request.url), | 8469 HostPortPair::FromURL(request.url), |
| 8471 666 /* port is ignored by MockConnect anyway */, | 8470 666 /* port is ignored by MockConnect anyway */, |
| 8472 AlternateProtocolFromNextProto(GetParam())); | 8471 AlternateProtocolFromNextProto(GetParam()), 1); |
| 8473 | 8472 |
| 8474 scoped_ptr<HttpTransaction> trans( | 8473 scoped_ptr<HttpTransaction> trans( |
| 8475 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); | 8474 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
| 8476 TestCompletionCallback callback; | 8475 TestCompletionCallback callback; |
| 8477 | 8476 |
| 8478 int rv = trans->Start(&request, callback.callback(), BoundNetLog()); | 8477 int rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
| 8479 EXPECT_EQ(ERR_IO_PENDING, rv); | 8478 EXPECT_EQ(ERR_IO_PENDING, rv); |
| 8480 EXPECT_EQ(OK, callback.WaitForResult()); | 8479 EXPECT_EQ(OK, callback.WaitForResult()); |
| 8481 | 8480 |
| 8482 const HttpResponseInfo* response = trans->GetResponseInfo(); | 8481 const HttpResponseInfo* response = trans->GetResponseInfo(); |
| 8483 ASSERT_TRUE(response != NULL); | 8482 ASSERT_TRUE(response != NULL); |
| 8484 ASSERT_TRUE(response->headers.get() != NULL); | 8483 ASSERT_TRUE(response->headers.get() != NULL); |
| 8485 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); | 8484 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
| 8486 | 8485 |
| 8487 std::string response_data; | 8486 std::string response_data; |
| 8488 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data)); | 8487 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data)); |
| 8489 EXPECT_EQ("hello world", response_data); | 8488 EXPECT_EQ("hello world", response_data); |
| 8490 | 8489 |
| 8491 ASSERT_TRUE(http_server_properties->HasAlternateProtocol( | 8490 ASSERT_TRUE(http_server_properties->HasAlternateProtocol( |
| 8492 HostPortPair::FromURL(request.url))); | 8491 HostPortPair::FromURL(request.url))); |
| 8493 const PortAlternateProtocolPair alternate = | 8492 const AlternateProtocolInfo alternate = |
| 8494 http_server_properties->GetAlternateProtocol( | 8493 http_server_properties->GetAlternateProtocol( |
| 8495 HostPortPair::FromURL(request.url)); | 8494 HostPortPair::FromURL(request.url)); |
| 8496 EXPECT_EQ(ALTERNATE_PROTOCOL_BROKEN, alternate.protocol); | 8495 EXPECT_EQ(ALTERNATE_PROTOCOL_BROKEN, alternate.protocol); |
| 8497 } | 8496 } |
| 8498 | 8497 |
| 8499 TEST_P(HttpNetworkTransactionTest, | 8498 TEST_P(HttpNetworkTransactionTest, |
| 8500 AlternateProtocolPortRestrictedBlocked) { | 8499 AlternateProtocolPortRestrictedBlocked) { |
| 8501 // Ensure that we're not allowed to redirect traffic via an alternate | 8500 // Ensure that we're not allowed to redirect traffic via an alternate |
| 8502 // protocol to an unrestricted (port >= 1024) when the original traffic was | 8501 // protocol to an unrestricted (port >= 1024) when the original traffic was |
| 8503 // on a restricted port (port < 1024). Ensure that we can redirect in all | 8502 // on a restricted port (port < 1024). Ensure that we can redirect in all |
| (...skipping 20 matching lines...) Expand all Loading... |
| 8524 session_deps_.socket_factory->AddSocketDataProvider(&second_data); | 8523 session_deps_.socket_factory->AddSocketDataProvider(&second_data); |
| 8525 | 8524 |
| 8526 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); | 8525 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
| 8527 | 8526 |
| 8528 base::WeakPtr<HttpServerProperties> http_server_properties = | 8527 base::WeakPtr<HttpServerProperties> http_server_properties = |
| 8529 session->http_server_properties(); | 8528 session->http_server_properties(); |
| 8530 const int kUnrestrictedAlternatePort = 1024; | 8529 const int kUnrestrictedAlternatePort = 1024; |
| 8531 http_server_properties->SetAlternateProtocol( | 8530 http_server_properties->SetAlternateProtocol( |
| 8532 HostPortPair::FromURL(restricted_port_request.url), | 8531 HostPortPair::FromURL(restricted_port_request.url), |
| 8533 kUnrestrictedAlternatePort, | 8532 kUnrestrictedAlternatePort, |
| 8534 AlternateProtocolFromNextProto(GetParam())); | 8533 AlternateProtocolFromNextProto(GetParam()), 1); |
| 8535 | 8534 |
| 8536 scoped_ptr<HttpTransaction> trans( | 8535 scoped_ptr<HttpTransaction> trans( |
| 8537 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); | 8536 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
| 8538 TestCompletionCallback callback; | 8537 TestCompletionCallback callback; |
| 8539 | 8538 |
| 8540 int rv = trans->Start( | 8539 int rv = trans->Start( |
| 8541 &restricted_port_request, | 8540 &restricted_port_request, |
| 8542 callback.callback(), BoundNetLog()); | 8541 callback.callback(), BoundNetLog()); |
| 8543 EXPECT_EQ(ERR_IO_PENDING, rv); | 8542 EXPECT_EQ(ERR_IO_PENDING, rv); |
| 8544 // Invalid change to unrestricted port should fail. | 8543 // Invalid change to unrestricted port should fail. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 8575 session_deps_.socket_factory->AddSocketDataProvider(&second_data); | 8574 session_deps_.socket_factory->AddSocketDataProvider(&second_data); |
| 8576 | 8575 |
| 8577 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); | 8576 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
| 8578 | 8577 |
| 8579 base::WeakPtr<HttpServerProperties> http_server_properties = | 8578 base::WeakPtr<HttpServerProperties> http_server_properties = |
| 8580 session->http_server_properties(); | 8579 session->http_server_properties(); |
| 8581 const int kUnrestrictedAlternatePort = 1024; | 8580 const int kUnrestrictedAlternatePort = 1024; |
| 8582 http_server_properties->SetAlternateProtocol( | 8581 http_server_properties->SetAlternateProtocol( |
| 8583 HostPortPair::FromURL(restricted_port_request.url), | 8582 HostPortPair::FromURL(restricted_port_request.url), |
| 8584 kUnrestrictedAlternatePort, | 8583 kUnrestrictedAlternatePort, |
| 8585 AlternateProtocolFromNextProto(GetParam())); | 8584 AlternateProtocolFromNextProto(GetParam()), 1); |
| 8586 | 8585 |
| 8587 scoped_ptr<HttpTransaction> trans( | 8586 scoped_ptr<HttpTransaction> trans( |
| 8588 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); | 8587 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
| 8589 TestCompletionCallback callback; | 8588 TestCompletionCallback callback; |
| 8590 | 8589 |
| 8591 EXPECT_EQ(ERR_IO_PENDING, trans->Start( | 8590 EXPECT_EQ(ERR_IO_PENDING, trans->Start( |
| 8592 &restricted_port_request, | 8591 &restricted_port_request, |
| 8593 callback.callback(), BoundNetLog())); | 8592 callback.callback(), BoundNetLog())); |
| 8594 // Change to unrestricted port should succeed. | 8593 // Change to unrestricted port should succeed. |
| 8595 EXPECT_EQ(OK, callback.WaitForResult()); | 8594 EXPECT_EQ(OK, callback.WaitForResult()); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 8623 session_deps_.socket_factory->AddSocketDataProvider(&second_data); | 8622 session_deps_.socket_factory->AddSocketDataProvider(&second_data); |
| 8624 | 8623 |
| 8625 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); | 8624 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
| 8626 | 8625 |
| 8627 base::WeakPtr<HttpServerProperties> http_server_properties = | 8626 base::WeakPtr<HttpServerProperties> http_server_properties = |
| 8628 session->http_server_properties(); | 8627 session->http_server_properties(); |
| 8629 const int kRestrictedAlternatePort = 80; | 8628 const int kRestrictedAlternatePort = 80; |
| 8630 http_server_properties->SetAlternateProtocol( | 8629 http_server_properties->SetAlternateProtocol( |
| 8631 HostPortPair::FromURL(restricted_port_request.url), | 8630 HostPortPair::FromURL(restricted_port_request.url), |
| 8632 kRestrictedAlternatePort, | 8631 kRestrictedAlternatePort, |
| 8633 AlternateProtocolFromNextProto(GetParam())); | 8632 AlternateProtocolFromNextProto(GetParam()), 1); |
| 8634 | 8633 |
| 8635 scoped_ptr<HttpTransaction> trans( | 8634 scoped_ptr<HttpTransaction> trans( |
| 8636 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); | 8635 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
| 8637 TestCompletionCallback callback; | 8636 TestCompletionCallback callback; |
| 8638 | 8637 |
| 8639 int rv = trans->Start( | 8638 int rv = trans->Start( |
| 8640 &restricted_port_request, | 8639 &restricted_port_request, |
| 8641 callback.callback(), BoundNetLog()); | 8640 callback.callback(), BoundNetLog()); |
| 8642 EXPECT_EQ(ERR_IO_PENDING, rv); | 8641 EXPECT_EQ(ERR_IO_PENDING, rv); |
| 8643 // Valid change to restricted port should pass. | 8642 // Valid change to restricted port should pass. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 8672 session_deps_.socket_factory->AddSocketDataProvider(&second_data); | 8671 session_deps_.socket_factory->AddSocketDataProvider(&second_data); |
| 8673 | 8672 |
| 8674 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); | 8673 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
| 8675 | 8674 |
| 8676 base::WeakPtr<HttpServerProperties> http_server_properties = | 8675 base::WeakPtr<HttpServerProperties> http_server_properties = |
| 8677 session->http_server_properties(); | 8676 session->http_server_properties(); |
| 8678 const int kRestrictedAlternatePort = 80; | 8677 const int kRestrictedAlternatePort = 80; |
| 8679 http_server_properties->SetAlternateProtocol( | 8678 http_server_properties->SetAlternateProtocol( |
| 8680 HostPortPair::FromURL(unrestricted_port_request.url), | 8679 HostPortPair::FromURL(unrestricted_port_request.url), |
| 8681 kRestrictedAlternatePort, | 8680 kRestrictedAlternatePort, |
| 8682 AlternateProtocolFromNextProto(GetParam())); | 8681 AlternateProtocolFromNextProto(GetParam()), 1); |
| 8683 | 8682 |
| 8684 scoped_ptr<HttpTransaction> trans( | 8683 scoped_ptr<HttpTransaction> trans( |
| 8685 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); | 8684 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
| 8686 TestCompletionCallback callback; | 8685 TestCompletionCallback callback; |
| 8687 | 8686 |
| 8688 int rv = trans->Start( | 8687 int rv = trans->Start( |
| 8689 &unrestricted_port_request, callback.callback(), BoundNetLog()); | 8688 &unrestricted_port_request, callback.callback(), BoundNetLog()); |
| 8690 EXPECT_EQ(ERR_IO_PENDING, rv); | 8689 EXPECT_EQ(ERR_IO_PENDING, rv); |
| 8691 // Valid change to restricted port should pass. | 8690 // Valid change to restricted port should pass. |
| 8692 EXPECT_EQ(OK, callback.WaitForResult()); | 8691 EXPECT_EQ(OK, callback.WaitForResult()); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 8720 session_deps_.socket_factory->AddSocketDataProvider(&second_data); | 8719 session_deps_.socket_factory->AddSocketDataProvider(&second_data); |
| 8721 | 8720 |
| 8722 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); | 8721 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
| 8723 | 8722 |
| 8724 base::WeakPtr<HttpServerProperties> http_server_properties = | 8723 base::WeakPtr<HttpServerProperties> http_server_properties = |
| 8725 session->http_server_properties(); | 8724 session->http_server_properties(); |
| 8726 const int kUnrestrictedAlternatePort = 1024; | 8725 const int kUnrestrictedAlternatePort = 1024; |
| 8727 http_server_properties->SetAlternateProtocol( | 8726 http_server_properties->SetAlternateProtocol( |
| 8728 HostPortPair::FromURL(unrestricted_port_request.url), | 8727 HostPortPair::FromURL(unrestricted_port_request.url), |
| 8729 kUnrestrictedAlternatePort, | 8728 kUnrestrictedAlternatePort, |
| 8730 AlternateProtocolFromNextProto(GetParam())); | 8729 AlternateProtocolFromNextProto(GetParam()), 1); |
| 8731 | 8730 |
| 8732 scoped_ptr<HttpTransaction> trans( | 8731 scoped_ptr<HttpTransaction> trans( |
| 8733 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); | 8732 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
| 8734 TestCompletionCallback callback; | 8733 TestCompletionCallback callback; |
| 8735 | 8734 |
| 8736 int rv = trans->Start( | 8735 int rv = trans->Start( |
| 8737 &unrestricted_port_request, callback.callback(), BoundNetLog()); | 8736 &unrestricted_port_request, callback.callback(), BoundNetLog()); |
| 8738 EXPECT_EQ(ERR_IO_PENDING, rv); | 8737 EXPECT_EQ(ERR_IO_PENDING, rv); |
| 8739 // Valid change to an unrestricted port should pass. | 8738 // Valid change to an unrestricted port should pass. |
| 8740 EXPECT_EQ(OK, callback.WaitForResult()); | 8739 EXPECT_EQ(OK, callback.WaitForResult()); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 8763 session_deps_.socket_factory->AddSocketDataProvider(&data); | 8762 session_deps_.socket_factory->AddSocketDataProvider(&data); |
| 8764 | 8763 |
| 8765 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); | 8764 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); |
| 8766 | 8765 |
| 8767 base::WeakPtr<HttpServerProperties> http_server_properties = | 8766 base::WeakPtr<HttpServerProperties> http_server_properties = |
| 8768 session->http_server_properties(); | 8767 session->http_server_properties(); |
| 8769 const int kUnsafePort = 7; | 8768 const int kUnsafePort = 7; |
| 8770 http_server_properties->SetAlternateProtocol( | 8769 http_server_properties->SetAlternateProtocol( |
| 8771 HostPortPair::FromURL(request.url), | 8770 HostPortPair::FromURL(request.url), |
| 8772 kUnsafePort, | 8771 kUnsafePort, |
| 8773 AlternateProtocolFromNextProto(GetParam())); | 8772 AlternateProtocolFromNextProto(GetParam()), 1); |
| 8774 | 8773 |
| 8775 scoped_ptr<HttpTransaction> trans( | 8774 scoped_ptr<HttpTransaction> trans( |
| 8776 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); | 8775 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); |
| 8777 TestCompletionCallback callback; | 8776 TestCompletionCallback callback; |
| 8778 | 8777 |
| 8779 int rv = trans->Start(&request, callback.callback(), BoundNetLog()); | 8778 int rv = trans->Start(&request, callback.callback(), BoundNetLog()); |
| 8780 EXPECT_EQ(ERR_IO_PENDING, rv); | 8779 EXPECT_EQ(ERR_IO_PENDING, rv); |
| 8781 // The HTTP request should succeed. | 8780 // The HTTP request should succeed. |
| 8782 EXPECT_EQ(OK, callback.WaitForResult()); | 8781 EXPECT_EQ(OK, callback.WaitForResult()); |
| 8783 | 8782 |
| (...skipping 4397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13181 EXPECT_EQ(ERR_IO_PENDING, rv); | 13180 EXPECT_EQ(ERR_IO_PENDING, rv); |
| 13182 | 13181 |
| 13183 rv = callback.WaitForResult(); | 13182 rv = callback.WaitForResult(); |
| 13184 EXPECT_EQ(ERR_CONNECTION_RESET, rv); | 13183 EXPECT_EQ(ERR_CONNECTION_RESET, rv); |
| 13185 | 13184 |
| 13186 const HttpResponseInfo* response = trans->GetResponseInfo(); | 13185 const HttpResponseInfo* response = trans->GetResponseInfo(); |
| 13187 EXPECT_TRUE(response == NULL); | 13186 EXPECT_TRUE(response == NULL); |
| 13188 } | 13187 } |
| 13189 | 13188 |
| 13190 } // namespace net | 13189 } // namespace net |
| OLD | NEW |