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

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

Issue 665083009: ABANDONED Handle multiple AlternateProtocols for each HostPortPair. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 11 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
OLDNEW
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 7584 matching lines...) Expand 10 before | Expand all | Expand 10 after
7595 bool ssl; 7595 bool ssl;
7596 }; 7596 };
7597 7597
7598 scoped_refptr<HttpNetworkSession> SetupSessionForGroupNameTests( 7598 scoped_refptr<HttpNetworkSession> SetupSessionForGroupNameTests(
7599 NextProto next_proto, 7599 NextProto next_proto,
7600 SpdySessionDependencies* session_deps_) { 7600 SpdySessionDependencies* session_deps_) {
7601 scoped_refptr<HttpNetworkSession> session(CreateSession(session_deps_)); 7601 scoped_refptr<HttpNetworkSession> session(CreateSession(session_deps_));
7602 7602
7603 base::WeakPtr<HttpServerProperties> http_server_properties = 7603 base::WeakPtr<HttpServerProperties> http_server_properties =
7604 session->http_server_properties(); 7604 session->http_server_properties();
7605 http_server_properties->SetAlternateProtocol( 7605 http_server_properties->AddAlternateProtocol(
7606 HostPortPair("host.with.alternate", 80), 443, 7606 HostPortPair("host.with.alternate", 80), 443,
7607 AlternateProtocolFromNextProto(next_proto), 1); 7607 AlternateProtocolFromNextProto(next_proto), 1);
7608 7608
7609 return session; 7609 return session;
7610 } 7610 }
7611 7611
7612 int GroupNameTransactionHelper( 7612 int GroupNameTransactionHelper(
7613 const std::string& url, 7613 const std::string& url,
7614 const scoped_refptr<HttpNetworkSession>& session) { 7614 const scoped_refptr<HttpNetworkSession>& session) {
7615 HttpRequestInfo request; 7615 HttpRequestInfo request;
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
8506 ASSERT_TRUE(response->headers.get() != NULL); 8506 ASSERT_TRUE(response->headers.get() != NULL);
8507 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); 8507 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine());
8508 EXPECT_FALSE(response->was_fetched_via_spdy); 8508 EXPECT_FALSE(response->was_fetched_via_spdy);
8509 EXPECT_FALSE(response->was_npn_negotiated); 8509 EXPECT_FALSE(response->was_npn_negotiated);
8510 8510
8511 std::string response_data; 8511 std::string response_data;
8512 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data)); 8512 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data));
8513 EXPECT_EQ("hello world", response_data); 8513 EXPECT_EQ("hello world", response_data);
8514 8514
8515 ASSERT_TRUE(http_server_properties.HasAlternateProtocol(http_host_port_pair)); 8515 ASSERT_TRUE(http_server_properties.HasAlternateProtocol(http_host_port_pair));
8516 const AlternateProtocolInfo alternate = 8516 const AlternateProtocols alternate_protocols =
8517 http_server_properties.GetAlternateProtocol(http_host_port_pair); 8517 http_server_properties.GetAlternateProtocols(http_host_port_pair);
8518 ASSERT_EQ(1u, alternate_protocols.size());
8518 AlternateProtocolInfo expected_alternate( 8519 AlternateProtocolInfo expected_alternate(
8519 443, AlternateProtocolFromNextProto(GetParam()), 1); 8520 443, AlternateProtocolFromNextProto(GetParam()), 1);
8520 EXPECT_TRUE(expected_alternate.Equals(alternate)); 8521 EXPECT_TRUE(expected_alternate.Equals(alternate_protocols[0]));
8521 } 8522 }
8522 8523
8523 TEST_P(HttpNetworkTransactionTest, 8524 TEST_P(HttpNetworkTransactionTest,
8524 MarkBrokenAlternateProtocolAndFallback) { 8525 MarkBrokenAlternateProtocolAndFallback) {
8525 session_deps_.use_alternate_protocols = true; 8526 session_deps_.use_alternate_protocols = true;
8526 8527
8527 HttpRequestInfo request; 8528 HttpRequestInfo request;
8528 request.method = "GET"; 8529 request.method = "GET";
8529 request.url = GURL("http://www.google.com/"); 8530 request.url = GURL("http://www.google.com/");
8530 request.load_flags = 0; 8531 request.load_flags = 0;
(...skipping 11 matching lines...) Expand all
8542 StaticSocketDataProvider second_data( 8543 StaticSocketDataProvider second_data(
8543 data_reads, arraysize(data_reads), NULL, 0); 8544 data_reads, arraysize(data_reads), NULL, 0);
8544 session_deps_.socket_factory->AddSocketDataProvider(&second_data); 8545 session_deps_.socket_factory->AddSocketDataProvider(&second_data);
8545 8546
8546 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 8547 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
8547 8548
8548 base::WeakPtr<HttpServerProperties> http_server_properties = 8549 base::WeakPtr<HttpServerProperties> http_server_properties =
8549 session->http_server_properties(); 8550 session->http_server_properties();
8550 // Port must be < 1024, or the header will be ignored (since initial port was 8551 // Port must be < 1024, or the header will be ignored (since initial port was
8551 // port 80 (another restricted port). 8552 // port 80 (another restricted port).
8552 http_server_properties->SetAlternateProtocol( 8553 http_server_properties->AddAlternateProtocol(
8553 HostPortPair::FromURL(request.url), 8554 HostPortPair::FromURL(request.url),
8554 666 /* port is ignored by MockConnect anyway */, 8555 666 /* port is ignored by MockConnect anyway */,
8555 AlternateProtocolFromNextProto(GetParam()), 1); 8556 AlternateProtocolFromNextProto(GetParam()), 1);
8556 8557
8557 scoped_ptr<HttpTransaction> trans( 8558 scoped_ptr<HttpTransaction> trans(
8558 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); 8559 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
8559 TestCompletionCallback callback; 8560 TestCompletionCallback callback;
8560 8561
8561 int rv = trans->Start(&request, callback.callback(), BoundNetLog()); 8562 int rv = trans->Start(&request, callback.callback(), BoundNetLog());
8562 EXPECT_EQ(ERR_IO_PENDING, rv); 8563 EXPECT_EQ(ERR_IO_PENDING, rv);
8563 EXPECT_EQ(OK, callback.WaitForResult()); 8564 EXPECT_EQ(OK, callback.WaitForResult());
8564 8565
8565 const HttpResponseInfo* response = trans->GetResponseInfo(); 8566 const HttpResponseInfo* response = trans->GetResponseInfo();
8566 ASSERT_TRUE(response != NULL); 8567 ASSERT_TRUE(response != NULL);
8567 ASSERT_TRUE(response->headers.get() != NULL); 8568 ASSERT_TRUE(response->headers.get() != NULL);
8568 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); 8569 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine());
8569 8570
8570 std::string response_data; 8571 std::string response_data;
8571 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data)); 8572 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data));
8572 EXPECT_EQ("hello world", response_data); 8573 EXPECT_EQ("hello world", response_data);
8573 8574
8574 ASSERT_TRUE(http_server_properties->HasAlternateProtocol( 8575 ASSERT_TRUE(http_server_properties->HasAlternateProtocol(
8575 HostPortPair::FromURL(request.url))); 8576 HostPortPair::FromURL(request.url)));
8576 const AlternateProtocolInfo alternate = 8577 const AlternateProtocols alternate_protocols =
8577 http_server_properties->GetAlternateProtocol( 8578 http_server_properties->GetAlternateProtocols(
8578 HostPortPair::FromURL(request.url)); 8579 HostPortPair::FromURL(request.url));
8580 ASSERT_EQ(1u, alternate_protocols.size());
8581 const AlternateProtocolInfo alternate = alternate_protocols[0];
8579 EXPECT_TRUE(alternate.is_broken); 8582 EXPECT_TRUE(alternate.is_broken);
8580 } 8583 }
8581 8584
8582 TEST_P(HttpNetworkTransactionTest, 8585 TEST_P(HttpNetworkTransactionTest,
8583 AlternateProtocolPortRestrictedBlocked) { 8586 AlternateProtocolPortRestrictedBlocked) {
8584 // Ensure that we're not allowed to redirect traffic via an alternate 8587 // Ensure that we're not allowed to redirect traffic via an alternate
8585 // protocol to an unrestricted (port >= 1024) when the original traffic was 8588 // protocol to an unrestricted (port >= 1024) when the original traffic was
8586 // on a restricted port (port < 1024). Ensure that we can redirect in all 8589 // on a restricted port (port < 1024). Ensure that we can redirect in all
8587 // other cases. 8590 // other cases.
8588 session_deps_.use_alternate_protocols = true; 8591 session_deps_.use_alternate_protocols = true;
(...skipping 15 matching lines...) Expand all
8604 }; 8607 };
8605 StaticSocketDataProvider second_data( 8608 StaticSocketDataProvider second_data(
8606 data_reads, arraysize(data_reads), NULL, 0); 8609 data_reads, arraysize(data_reads), NULL, 0);
8607 session_deps_.socket_factory->AddSocketDataProvider(&second_data); 8610 session_deps_.socket_factory->AddSocketDataProvider(&second_data);
8608 8611
8609 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 8612 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
8610 8613
8611 base::WeakPtr<HttpServerProperties> http_server_properties = 8614 base::WeakPtr<HttpServerProperties> http_server_properties =
8612 session->http_server_properties(); 8615 session->http_server_properties();
8613 const int kUnrestrictedAlternatePort = 1024; 8616 const int kUnrestrictedAlternatePort = 1024;
8614 http_server_properties->SetAlternateProtocol( 8617 http_server_properties->AddAlternateProtocol(
8615 HostPortPair::FromURL(restricted_port_request.url), 8618 HostPortPair::FromURL(restricted_port_request.url),
8616 kUnrestrictedAlternatePort, 8619 kUnrestrictedAlternatePort, AlternateProtocolFromNextProto(GetParam()),
8617 AlternateProtocolFromNextProto(GetParam()), 1); 8620 1);
8618 8621
8619 scoped_ptr<HttpTransaction> trans( 8622 scoped_ptr<HttpTransaction> trans(
8620 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); 8623 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
8621 TestCompletionCallback callback; 8624 TestCompletionCallback callback;
8622 8625
8623 int rv = trans->Start( 8626 int rv = trans->Start(
8624 &restricted_port_request, 8627 &restricted_port_request,
8625 callback.callback(), BoundNetLog()); 8628 callback.callback(), BoundNetLog());
8626 EXPECT_EQ(ERR_IO_PENDING, rv); 8629 EXPECT_EQ(ERR_IO_PENDING, rv);
8627 // Invalid change to unrestricted port should fail. 8630 // Invalid change to unrestricted port should fail.
(...skipping 27 matching lines...) Expand all
8655 }; 8658 };
8656 StaticSocketDataProvider second_data( 8659 StaticSocketDataProvider second_data(
8657 data_reads, arraysize(data_reads), NULL, 0); 8660 data_reads, arraysize(data_reads), NULL, 0);
8658 session_deps_.socket_factory->AddSocketDataProvider(&second_data); 8661 session_deps_.socket_factory->AddSocketDataProvider(&second_data);
8659 8662
8660 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 8663 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
8661 8664
8662 base::WeakPtr<HttpServerProperties> http_server_properties = 8665 base::WeakPtr<HttpServerProperties> http_server_properties =
8663 session->http_server_properties(); 8666 session->http_server_properties();
8664 const int kUnrestrictedAlternatePort = 1024; 8667 const int kUnrestrictedAlternatePort = 1024;
8665 http_server_properties->SetAlternateProtocol( 8668 http_server_properties->AddAlternateProtocol(
8666 HostPortPair::FromURL(restricted_port_request.url), 8669 HostPortPair::FromURL(restricted_port_request.url),
8667 kUnrestrictedAlternatePort, 8670 kUnrestrictedAlternatePort, AlternateProtocolFromNextProto(GetParam()),
8668 AlternateProtocolFromNextProto(GetParam()), 1); 8671 1);
8669 8672
8670 scoped_ptr<HttpTransaction> trans( 8673 scoped_ptr<HttpTransaction> trans(
8671 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); 8674 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
8672 TestCompletionCallback callback; 8675 TestCompletionCallback callback;
8673 8676
8674 EXPECT_EQ(ERR_IO_PENDING, trans->Start( 8677 EXPECT_EQ(ERR_IO_PENDING, trans->Start(
8675 &restricted_port_request, 8678 &restricted_port_request,
8676 callback.callback(), BoundNetLog())); 8679 callback.callback(), BoundNetLog()));
8677 // Change to unrestricted port should succeed. 8680 // Change to unrestricted port should succeed.
8678 EXPECT_EQ(OK, callback.WaitForResult()); 8681 EXPECT_EQ(OK, callback.WaitForResult());
(...skipping 24 matching lines...) Expand all
8703 }; 8706 };
8704 StaticSocketDataProvider second_data( 8707 StaticSocketDataProvider second_data(
8705 data_reads, arraysize(data_reads), NULL, 0); 8708 data_reads, arraysize(data_reads), NULL, 0);
8706 session_deps_.socket_factory->AddSocketDataProvider(&second_data); 8709 session_deps_.socket_factory->AddSocketDataProvider(&second_data);
8707 8710
8708 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 8711 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
8709 8712
8710 base::WeakPtr<HttpServerProperties> http_server_properties = 8713 base::WeakPtr<HttpServerProperties> http_server_properties =
8711 session->http_server_properties(); 8714 session->http_server_properties();
8712 const int kRestrictedAlternatePort = 80; 8715 const int kRestrictedAlternatePort = 80;
8713 http_server_properties->SetAlternateProtocol( 8716 http_server_properties->AddAlternateProtocol(
8714 HostPortPair::FromURL(restricted_port_request.url), 8717 HostPortPair::FromURL(restricted_port_request.url),
8715 kRestrictedAlternatePort, 8718 kRestrictedAlternatePort, AlternateProtocolFromNextProto(GetParam()), 1);
8716 AlternateProtocolFromNextProto(GetParam()), 1);
8717 8719
8718 scoped_ptr<HttpTransaction> trans( 8720 scoped_ptr<HttpTransaction> trans(
8719 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); 8721 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
8720 TestCompletionCallback callback; 8722 TestCompletionCallback callback;
8721 8723
8722 int rv = trans->Start( 8724 int rv = trans->Start(
8723 &restricted_port_request, 8725 &restricted_port_request,
8724 callback.callback(), BoundNetLog()); 8726 callback.callback(), BoundNetLog());
8725 EXPECT_EQ(ERR_IO_PENDING, rv); 8727 EXPECT_EQ(ERR_IO_PENDING, rv);
8726 // Valid change to restricted port should pass. 8728 // Valid change to restricted port should pass.
(...skipping 25 matching lines...) Expand all
8752 }; 8754 };
8753 StaticSocketDataProvider second_data( 8755 StaticSocketDataProvider second_data(
8754 data_reads, arraysize(data_reads), NULL, 0); 8756 data_reads, arraysize(data_reads), NULL, 0);
8755 session_deps_.socket_factory->AddSocketDataProvider(&second_data); 8757 session_deps_.socket_factory->AddSocketDataProvider(&second_data);
8756 8758
8757 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 8759 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
8758 8760
8759 base::WeakPtr<HttpServerProperties> http_server_properties = 8761 base::WeakPtr<HttpServerProperties> http_server_properties =
8760 session->http_server_properties(); 8762 session->http_server_properties();
8761 const int kRestrictedAlternatePort = 80; 8763 const int kRestrictedAlternatePort = 80;
8762 http_server_properties->SetAlternateProtocol( 8764 http_server_properties->AddAlternateProtocol(
8763 HostPortPair::FromURL(unrestricted_port_request.url), 8765 HostPortPair::FromURL(unrestricted_port_request.url),
8764 kRestrictedAlternatePort, 8766 kRestrictedAlternatePort, AlternateProtocolFromNextProto(GetParam()), 1);
8765 AlternateProtocolFromNextProto(GetParam()), 1);
8766 8767
8767 scoped_ptr<HttpTransaction> trans( 8768 scoped_ptr<HttpTransaction> trans(
8768 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); 8769 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
8769 TestCompletionCallback callback; 8770 TestCompletionCallback callback;
8770 8771
8771 int rv = trans->Start( 8772 int rv = trans->Start(
8772 &unrestricted_port_request, callback.callback(), BoundNetLog()); 8773 &unrestricted_port_request, callback.callback(), BoundNetLog());
8773 EXPECT_EQ(ERR_IO_PENDING, rv); 8774 EXPECT_EQ(ERR_IO_PENDING, rv);
8774 // Valid change to restricted port should pass. 8775 // Valid change to restricted port should pass.
8775 EXPECT_EQ(OK, callback.WaitForResult()); 8776 EXPECT_EQ(OK, callback.WaitForResult());
(...skipping 24 matching lines...) Expand all
8800 }; 8801 };
8801 StaticSocketDataProvider second_data( 8802 StaticSocketDataProvider second_data(
8802 data_reads, arraysize(data_reads), NULL, 0); 8803 data_reads, arraysize(data_reads), NULL, 0);
8803 session_deps_.socket_factory->AddSocketDataProvider(&second_data); 8804 session_deps_.socket_factory->AddSocketDataProvider(&second_data);
8804 8805
8805 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 8806 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
8806 8807
8807 base::WeakPtr<HttpServerProperties> http_server_properties = 8808 base::WeakPtr<HttpServerProperties> http_server_properties =
8808 session->http_server_properties(); 8809 session->http_server_properties();
8809 const int kUnrestrictedAlternatePort = 1024; 8810 const int kUnrestrictedAlternatePort = 1024;
8810 http_server_properties->SetAlternateProtocol( 8811 http_server_properties->AddAlternateProtocol(
8811 HostPortPair::FromURL(unrestricted_port_request.url), 8812 HostPortPair::FromURL(unrestricted_port_request.url),
8812 kUnrestrictedAlternatePort, 8813 kUnrestrictedAlternatePort, AlternateProtocolFromNextProto(GetParam()),
8813 AlternateProtocolFromNextProto(GetParam()), 1); 8814 1);
8814 8815
8815 scoped_ptr<HttpTransaction> trans( 8816 scoped_ptr<HttpTransaction> trans(
8816 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); 8817 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
8817 TestCompletionCallback callback; 8818 TestCompletionCallback callback;
8818 8819
8819 int rv = trans->Start( 8820 int rv = trans->Start(
8820 &unrestricted_port_request, callback.callback(), BoundNetLog()); 8821 &unrestricted_port_request, callback.callback(), BoundNetLog());
8821 EXPECT_EQ(ERR_IO_PENDING, rv); 8822 EXPECT_EQ(ERR_IO_PENDING, rv);
8822 // Valid change to an unrestricted port should pass. 8823 // Valid change to an unrestricted port should pass.
8823 EXPECT_EQ(OK, callback.WaitForResult()); 8824 EXPECT_EQ(OK, callback.WaitForResult());
(...skipping 19 matching lines...) Expand all
8843 }; 8844 };
8844 StaticSocketDataProvider data( 8845 StaticSocketDataProvider data(
8845 data_reads, arraysize(data_reads), NULL, 0); 8846 data_reads, arraysize(data_reads), NULL, 0);
8846 session_deps_.socket_factory->AddSocketDataProvider(&data); 8847 session_deps_.socket_factory->AddSocketDataProvider(&data);
8847 8848
8848 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 8849 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
8849 8850
8850 base::WeakPtr<HttpServerProperties> http_server_properties = 8851 base::WeakPtr<HttpServerProperties> http_server_properties =
8851 session->http_server_properties(); 8852 session->http_server_properties();
8852 const int kUnsafePort = 7; 8853 const int kUnsafePort = 7;
8853 http_server_properties->SetAlternateProtocol( 8854 http_server_properties->AddAlternateProtocol(
8854 HostPortPair::FromURL(request.url), 8855 HostPortPair::FromURL(request.url), kUnsafePort,
8855 kUnsafePort,
8856 AlternateProtocolFromNextProto(GetParam()), 1); 8856 AlternateProtocolFromNextProto(GetParam()), 1);
8857 8857
8858 scoped_ptr<HttpTransaction> trans( 8858 scoped_ptr<HttpTransaction> trans(
8859 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); 8859 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
8860 TestCompletionCallback callback; 8860 TestCompletionCallback callback;
8861 8861
8862 int rv = trans->Start(&request, callback.callback(), BoundNetLog()); 8862 int rv = trans->Start(&request, callback.callback(), BoundNetLog());
8863 EXPECT_EQ(ERR_IO_PENDING, rv); 8863 EXPECT_EQ(ERR_IO_PENDING, rv);
8864 // The HTTP request should succeed. 8864 // The HTTP request should succeed.
8865 EXPECT_EQ(OK, callback.WaitForResult()); 8865 EXPECT_EQ(OK, callback.WaitForResult());
(...skipping 4382 matching lines...) Expand 10 before | Expand all | Expand 10 after
13248 EXPECT_EQ(ERR_IO_PENDING, rv); 13248 EXPECT_EQ(ERR_IO_PENDING, rv);
13249 13249
13250 rv = callback.WaitForResult(); 13250 rv = callback.WaitForResult();
13251 EXPECT_EQ(ERR_CONNECTION_RESET, rv); 13251 EXPECT_EQ(ERR_CONNECTION_RESET, rv);
13252 13252
13253 const HttpResponseInfo* response = trans->GetResponseInfo(); 13253 const HttpResponseInfo* response = trans->GetResponseInfo();
13254 EXPECT_TRUE(response == NULL); 13254 EXPECT_TRUE(response == NULL);
13255 } 13255 }
13256 13256
13257 } // namespace net 13257 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698