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

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: Work on pref load/save and on Job. Created 5 years, 10 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 7596 matching lines...) Expand 10 before | Expand all | Expand 10 after
7607 bool ssl; 7607 bool ssl;
7608 }; 7608 };
7609 7609
7610 scoped_refptr<HttpNetworkSession> SetupSessionForGroupNameTests( 7610 scoped_refptr<HttpNetworkSession> SetupSessionForGroupNameTests(
7611 NextProto next_proto, 7611 NextProto next_proto,
7612 SpdySessionDependencies* session_deps_) { 7612 SpdySessionDependencies* session_deps_) {
7613 scoped_refptr<HttpNetworkSession> session(CreateSession(session_deps_)); 7613 scoped_refptr<HttpNetworkSession> session(CreateSession(session_deps_));
7614 7614
7615 base::WeakPtr<HttpServerProperties> http_server_properties = 7615 base::WeakPtr<HttpServerProperties> http_server_properties =
7616 session->http_server_properties(); 7616 session->http_server_properties();
7617 http_server_properties->SetAlternateProtocol( 7617 http_server_properties->AddAlternateProtocol(
7618 HostPortPair("host.with.alternate", 80), 443, 7618 HostPortPair("host.with.alternate", 80), 443,
7619 AlternateProtocolFromNextProto(next_proto), 1); 7619 AlternateProtocolFromNextProto(next_proto), 1.0);
7620 7620
7621 return session; 7621 return session;
7622 } 7622 }
7623 7623
7624 int GroupNameTransactionHelper( 7624 int GroupNameTransactionHelper(
7625 const std::string& url, 7625 const std::string& url,
7626 const scoped_refptr<HttpNetworkSession>& session) { 7626 const scoped_refptr<HttpNetworkSession>& session) {
7627 HttpRequestInfo request; 7627 HttpRequestInfo request;
7628 request.method = "GET"; 7628 request.method = "GET";
7629 request.url = GURL(url); 7629 request.url = GURL(url);
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
8518 ASSERT_TRUE(response->headers.get() != NULL); 8518 ASSERT_TRUE(response->headers.get() != NULL);
8519 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); 8519 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine());
8520 EXPECT_FALSE(response->was_fetched_via_spdy); 8520 EXPECT_FALSE(response->was_fetched_via_spdy);
8521 EXPECT_FALSE(response->was_npn_negotiated); 8521 EXPECT_FALSE(response->was_npn_negotiated);
8522 8522
8523 std::string response_data; 8523 std::string response_data;
8524 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data)); 8524 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data));
8525 EXPECT_EQ("hello world", response_data); 8525 EXPECT_EQ("hello world", response_data);
8526 8526
8527 ASSERT_TRUE(http_server_properties.HasAlternateProtocol(http_host_port_pair)); 8527 ASSERT_TRUE(http_server_properties.HasAlternateProtocol(http_host_port_pair));
8528 const AlternateProtocolInfo alternate = 8528 const AlternateProtocols alternate_protocols =
8529 http_server_properties.GetAlternateProtocol(http_host_port_pair); 8529 http_server_properties.GetAlternateProtocols(http_host_port_pair);
8530 ASSERT_EQ(1u, alternate_protocols.size());
8530 AlternateProtocolInfo expected_alternate( 8531 AlternateProtocolInfo expected_alternate(
8531 443, AlternateProtocolFromNextProto(GetParam()), 1); 8532 443, AlternateProtocolFromNextProto(GetParam()), 1.0);
8532 EXPECT_TRUE(expected_alternate.Equals(alternate)); 8533 EXPECT_TRUE(expected_alternate.Equals(alternate_protocols[0]));
8533 } 8534 }
8534 8535
8535 TEST_P(HttpNetworkTransactionTest, 8536 TEST_P(HttpNetworkTransactionTest,
8536 MarkBrokenAlternateProtocolAndFallback) { 8537 MarkBrokenAlternateProtocolAndFallback) {
8537 session_deps_.use_alternate_protocols = true; 8538 session_deps_.use_alternate_protocols = true;
8538 8539
8539 HttpRequestInfo request; 8540 HttpRequestInfo request;
8540 request.method = "GET"; 8541 request.method = "GET";
8541 request.url = GURL("http://www.google.com/"); 8542 request.url = GURL("http://www.google.com/");
8542 request.load_flags = 0; 8543 request.load_flags = 0;
(...skipping 11 matching lines...) Expand all
8554 StaticSocketDataProvider second_data( 8555 StaticSocketDataProvider second_data(
8555 data_reads, arraysize(data_reads), NULL, 0); 8556 data_reads, arraysize(data_reads), NULL, 0);
8556 session_deps_.socket_factory->AddSocketDataProvider(&second_data); 8557 session_deps_.socket_factory->AddSocketDataProvider(&second_data);
8557 8558
8558 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 8559 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
8559 8560
8560 base::WeakPtr<HttpServerProperties> http_server_properties = 8561 base::WeakPtr<HttpServerProperties> http_server_properties =
8561 session->http_server_properties(); 8562 session->http_server_properties();
8562 // Port must be < 1024, or the header will be ignored (since initial port was 8563 // Port must be < 1024, or the header will be ignored (since initial port was
8563 // port 80 (another restricted port). 8564 // port 80 (another restricted port).
8564 http_server_properties->SetAlternateProtocol( 8565 http_server_properties->AddAlternateProtocol(
8565 HostPortPair::FromURL(request.url), 8566 HostPortPair::FromURL(request.url),
8566 666 /* port is ignored by MockConnect anyway */, 8567 666 /* port is ignored by MockConnect anyway */,
8567 AlternateProtocolFromNextProto(GetParam()), 1); 8568 AlternateProtocolFromNextProto(GetParam()), 1.0);
8568 8569
8569 scoped_ptr<HttpTransaction> trans( 8570 scoped_ptr<HttpTransaction> trans(
8570 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); 8571 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
8571 TestCompletionCallback callback; 8572 TestCompletionCallback callback;
8572 8573
8573 int rv = trans->Start(&request, callback.callback(), BoundNetLog()); 8574 int rv = trans->Start(&request, callback.callback(), BoundNetLog());
8574 EXPECT_EQ(ERR_IO_PENDING, rv); 8575 EXPECT_EQ(ERR_IO_PENDING, rv);
8575 EXPECT_EQ(OK, callback.WaitForResult()); 8576 EXPECT_EQ(OK, callback.WaitForResult());
8576 8577
8577 const HttpResponseInfo* response = trans->GetResponseInfo(); 8578 const HttpResponseInfo* response = trans->GetResponseInfo();
8578 ASSERT_TRUE(response != NULL); 8579 ASSERT_TRUE(response != NULL);
8579 ASSERT_TRUE(response->headers.get() != NULL); 8580 ASSERT_TRUE(response->headers.get() != NULL);
8580 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); 8581 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine());
8581 8582
8582 std::string response_data; 8583 std::string response_data;
8583 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data)); 8584 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data));
8584 EXPECT_EQ("hello world", response_data); 8585 EXPECT_EQ("hello world", response_data);
8585 8586
8586 ASSERT_TRUE(http_server_properties->HasAlternateProtocol( 8587 ASSERT_TRUE(http_server_properties->HasAlternateProtocol(
8587 HostPortPair::FromURL(request.url))); 8588 HostPortPair::FromURL(request.url)));
8588 const AlternateProtocolInfo alternate = 8589 const AlternateProtocols alternate_protocols =
8589 http_server_properties->GetAlternateProtocol( 8590 http_server_properties->GetAlternateProtocols(
8590 HostPortPair::FromURL(request.url)); 8591 HostPortPair::FromURL(request.url));
8592 ASSERT_EQ(1u, alternate_protocols.size());
8593 const AlternateProtocolInfo alternate = alternate_protocols[0];
8591 EXPECT_TRUE(alternate.is_broken); 8594 EXPECT_TRUE(alternate.is_broken);
8592 } 8595 }
8593 8596
8594 TEST_P(HttpNetworkTransactionTest, 8597 TEST_P(HttpNetworkTransactionTest,
8595 AlternateProtocolPortRestrictedBlocked) { 8598 AlternateProtocolPortRestrictedBlocked) {
8596 // Ensure that we're not allowed to redirect traffic via an alternate 8599 // Ensure that we're not allowed to redirect traffic via an alternate
8597 // protocol to an unrestricted (port >= 1024) when the original traffic was 8600 // protocol to an unrestricted (port >= 1024) when the original traffic was
8598 // on a restricted port (port < 1024). Ensure that we can redirect in all 8601 // on a restricted port (port < 1024). Ensure that we can redirect in all
8599 // other cases. 8602 // other cases.
8600 session_deps_.use_alternate_protocols = true; 8603 session_deps_.use_alternate_protocols = true;
(...skipping 15 matching lines...) Expand all
8616 }; 8619 };
8617 StaticSocketDataProvider second_data( 8620 StaticSocketDataProvider second_data(
8618 data_reads, arraysize(data_reads), NULL, 0); 8621 data_reads, arraysize(data_reads), NULL, 0);
8619 session_deps_.socket_factory->AddSocketDataProvider(&second_data); 8622 session_deps_.socket_factory->AddSocketDataProvider(&second_data);
8620 8623
8621 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 8624 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
8622 8625
8623 base::WeakPtr<HttpServerProperties> http_server_properties = 8626 base::WeakPtr<HttpServerProperties> http_server_properties =
8624 session->http_server_properties(); 8627 session->http_server_properties();
8625 const int kUnrestrictedAlternatePort = 1024; 8628 const int kUnrestrictedAlternatePort = 1024;
8626 http_server_properties->SetAlternateProtocol( 8629 http_server_properties->AddAlternateProtocol(
8627 HostPortPair::FromURL(restricted_port_request.url), 8630 HostPortPair::FromURL(restricted_port_request.url),
8628 kUnrestrictedAlternatePort, 8631 kUnrestrictedAlternatePort, AlternateProtocolFromNextProto(GetParam()),
8629 AlternateProtocolFromNextProto(GetParam()), 1); 8632 1.0);
8630 8633
8631 scoped_ptr<HttpTransaction> trans( 8634 scoped_ptr<HttpTransaction> trans(
8632 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); 8635 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
8633 TestCompletionCallback callback; 8636 TestCompletionCallback callback;
8634 8637
8635 int rv = trans->Start( 8638 int rv = trans->Start(
8636 &restricted_port_request, 8639 &restricted_port_request,
8637 callback.callback(), BoundNetLog()); 8640 callback.callback(), BoundNetLog());
8638 EXPECT_EQ(ERR_IO_PENDING, rv); 8641 EXPECT_EQ(ERR_IO_PENDING, rv);
8639 // Invalid change to unrestricted port should fail. 8642 // Invalid change to unrestricted port should fail.
(...skipping 27 matching lines...) Expand all
8667 }; 8670 };
8668 StaticSocketDataProvider second_data( 8671 StaticSocketDataProvider second_data(
8669 data_reads, arraysize(data_reads), NULL, 0); 8672 data_reads, arraysize(data_reads), NULL, 0);
8670 session_deps_.socket_factory->AddSocketDataProvider(&second_data); 8673 session_deps_.socket_factory->AddSocketDataProvider(&second_data);
8671 8674
8672 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 8675 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
8673 8676
8674 base::WeakPtr<HttpServerProperties> http_server_properties = 8677 base::WeakPtr<HttpServerProperties> http_server_properties =
8675 session->http_server_properties(); 8678 session->http_server_properties();
8676 const int kUnrestrictedAlternatePort = 1024; 8679 const int kUnrestrictedAlternatePort = 1024;
8677 http_server_properties->SetAlternateProtocol( 8680 http_server_properties->AddAlternateProtocol(
8678 HostPortPair::FromURL(restricted_port_request.url), 8681 HostPortPair::FromURL(restricted_port_request.url),
8679 kUnrestrictedAlternatePort, 8682 kUnrestrictedAlternatePort, AlternateProtocolFromNextProto(GetParam()),
8680 AlternateProtocolFromNextProto(GetParam()), 1); 8683 1.0);
8681 8684
8682 scoped_ptr<HttpTransaction> trans( 8685 scoped_ptr<HttpTransaction> trans(
8683 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); 8686 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
8684 TestCompletionCallback callback; 8687 TestCompletionCallback callback;
8685 8688
8686 EXPECT_EQ(ERR_IO_PENDING, trans->Start( 8689 EXPECT_EQ(ERR_IO_PENDING, trans->Start(
8687 &restricted_port_request, 8690 &restricted_port_request,
8688 callback.callback(), BoundNetLog())); 8691 callback.callback(), BoundNetLog()));
8689 // Change to unrestricted port should succeed. 8692 // Change to unrestricted port should succeed.
8690 EXPECT_EQ(OK, callback.WaitForResult()); 8693 EXPECT_EQ(OK, callback.WaitForResult());
(...skipping 24 matching lines...) Expand all
8715 }; 8718 };
8716 StaticSocketDataProvider second_data( 8719 StaticSocketDataProvider second_data(
8717 data_reads, arraysize(data_reads), NULL, 0); 8720 data_reads, arraysize(data_reads), NULL, 0);
8718 session_deps_.socket_factory->AddSocketDataProvider(&second_data); 8721 session_deps_.socket_factory->AddSocketDataProvider(&second_data);
8719 8722
8720 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 8723 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
8721 8724
8722 base::WeakPtr<HttpServerProperties> http_server_properties = 8725 base::WeakPtr<HttpServerProperties> http_server_properties =
8723 session->http_server_properties(); 8726 session->http_server_properties();
8724 const int kRestrictedAlternatePort = 80; 8727 const int kRestrictedAlternatePort = 80;
8725 http_server_properties->SetAlternateProtocol( 8728 http_server_properties->AddAlternateProtocol(
8726 HostPortPair::FromURL(restricted_port_request.url), 8729 HostPortPair::FromURL(restricted_port_request.url),
8727 kRestrictedAlternatePort, 8730 kRestrictedAlternatePort, AlternateProtocolFromNextProto(GetParam()),
8728 AlternateProtocolFromNextProto(GetParam()), 1); 8731 1.0);
8729 8732
8730 scoped_ptr<HttpTransaction> trans( 8733 scoped_ptr<HttpTransaction> trans(
8731 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); 8734 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
8732 TestCompletionCallback callback; 8735 TestCompletionCallback callback;
8733 8736
8734 int rv = trans->Start( 8737 int rv = trans->Start(
8735 &restricted_port_request, 8738 &restricted_port_request,
8736 callback.callback(), BoundNetLog()); 8739 callback.callback(), BoundNetLog());
8737 EXPECT_EQ(ERR_IO_PENDING, rv); 8740 EXPECT_EQ(ERR_IO_PENDING, rv);
8738 // Valid change to restricted port should pass. 8741 // Valid change to restricted port should pass.
(...skipping 25 matching lines...) Expand all
8764 }; 8767 };
8765 StaticSocketDataProvider second_data( 8768 StaticSocketDataProvider second_data(
8766 data_reads, arraysize(data_reads), NULL, 0); 8769 data_reads, arraysize(data_reads), NULL, 0);
8767 session_deps_.socket_factory->AddSocketDataProvider(&second_data); 8770 session_deps_.socket_factory->AddSocketDataProvider(&second_data);
8768 8771
8769 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 8772 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
8770 8773
8771 base::WeakPtr<HttpServerProperties> http_server_properties = 8774 base::WeakPtr<HttpServerProperties> http_server_properties =
8772 session->http_server_properties(); 8775 session->http_server_properties();
8773 const int kRestrictedAlternatePort = 80; 8776 const int kRestrictedAlternatePort = 80;
8774 http_server_properties->SetAlternateProtocol( 8777 http_server_properties->AddAlternateProtocol(
8775 HostPortPair::FromURL(unrestricted_port_request.url), 8778 HostPortPair::FromURL(unrestricted_port_request.url),
8776 kRestrictedAlternatePort, 8779 kRestrictedAlternatePort, AlternateProtocolFromNextProto(GetParam()),
8777 AlternateProtocolFromNextProto(GetParam()), 1); 8780 1.0);
8778 8781
8779 scoped_ptr<HttpTransaction> trans( 8782 scoped_ptr<HttpTransaction> trans(
8780 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); 8783 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
8781 TestCompletionCallback callback; 8784 TestCompletionCallback callback;
8782 8785
8783 int rv = trans->Start( 8786 int rv = trans->Start(
8784 &unrestricted_port_request, callback.callback(), BoundNetLog()); 8787 &unrestricted_port_request, callback.callback(), BoundNetLog());
8785 EXPECT_EQ(ERR_IO_PENDING, rv); 8788 EXPECT_EQ(ERR_IO_PENDING, rv);
8786 // Valid change to restricted port should pass. 8789 // Valid change to restricted port should pass.
8787 EXPECT_EQ(OK, callback.WaitForResult()); 8790 EXPECT_EQ(OK, callback.WaitForResult());
(...skipping 24 matching lines...) Expand all
8812 }; 8815 };
8813 StaticSocketDataProvider second_data( 8816 StaticSocketDataProvider second_data(
8814 data_reads, arraysize(data_reads), NULL, 0); 8817 data_reads, arraysize(data_reads), NULL, 0);
8815 session_deps_.socket_factory->AddSocketDataProvider(&second_data); 8818 session_deps_.socket_factory->AddSocketDataProvider(&second_data);
8816 8819
8817 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 8820 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
8818 8821
8819 base::WeakPtr<HttpServerProperties> http_server_properties = 8822 base::WeakPtr<HttpServerProperties> http_server_properties =
8820 session->http_server_properties(); 8823 session->http_server_properties();
8821 const int kUnrestrictedAlternatePort = 1024; 8824 const int kUnrestrictedAlternatePort = 1024;
8822 http_server_properties->SetAlternateProtocol( 8825 http_server_properties->AddAlternateProtocol(
8823 HostPortPair::FromURL(unrestricted_port_request.url), 8826 HostPortPair::FromURL(unrestricted_port_request.url),
8824 kUnrestrictedAlternatePort, 8827 kUnrestrictedAlternatePort, AlternateProtocolFromNextProto(GetParam()),
8825 AlternateProtocolFromNextProto(GetParam()), 1); 8828 1.0);
8826 8829
8827 scoped_ptr<HttpTransaction> trans( 8830 scoped_ptr<HttpTransaction> trans(
8828 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); 8831 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
8829 TestCompletionCallback callback; 8832 TestCompletionCallback callback;
8830 8833
8831 int rv = trans->Start( 8834 int rv = trans->Start(
8832 &unrestricted_port_request, callback.callback(), BoundNetLog()); 8835 &unrestricted_port_request, callback.callback(), BoundNetLog());
8833 EXPECT_EQ(ERR_IO_PENDING, rv); 8836 EXPECT_EQ(ERR_IO_PENDING, rv);
8834 // Valid change to an unrestricted port should pass. 8837 // Valid change to an unrestricted port should pass.
8835 EXPECT_EQ(OK, callback.WaitForResult()); 8838 EXPECT_EQ(OK, callback.WaitForResult());
(...skipping 19 matching lines...) Expand all
8855 }; 8858 };
8856 StaticSocketDataProvider data( 8859 StaticSocketDataProvider data(
8857 data_reads, arraysize(data_reads), NULL, 0); 8860 data_reads, arraysize(data_reads), NULL, 0);
8858 session_deps_.socket_factory->AddSocketDataProvider(&data); 8861 session_deps_.socket_factory->AddSocketDataProvider(&data);
8859 8862
8860 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 8863 scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps_));
8861 8864
8862 base::WeakPtr<HttpServerProperties> http_server_properties = 8865 base::WeakPtr<HttpServerProperties> http_server_properties =
8863 session->http_server_properties(); 8866 session->http_server_properties();
8864 const int kUnsafePort = 7; 8867 const int kUnsafePort = 7;
8865 http_server_properties->SetAlternateProtocol( 8868 http_server_properties->AddAlternateProtocol(
8866 HostPortPair::FromURL(request.url), 8869 HostPortPair::FromURL(request.url), kUnsafePort,
8867 kUnsafePort, 8870 AlternateProtocolFromNextProto(GetParam()), 1.0);
8868 AlternateProtocolFromNextProto(GetParam()), 1);
8869 8871
8870 scoped_ptr<HttpTransaction> trans( 8872 scoped_ptr<HttpTransaction> trans(
8871 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get())); 8873 new HttpNetworkTransaction(DEFAULT_PRIORITY, session.get()));
8872 TestCompletionCallback callback; 8874 TestCompletionCallback callback;
8873 8875
8874 int rv = trans->Start(&request, callback.callback(), BoundNetLog()); 8876 int rv = trans->Start(&request, callback.callback(), BoundNetLog());
8875 EXPECT_EQ(ERR_IO_PENDING, rv); 8877 EXPECT_EQ(ERR_IO_PENDING, rv);
8876 // The HTTP request should succeed. 8878 // The HTTP request should succeed.
8877 EXPECT_EQ(OK, callback.WaitForResult()); 8879 EXPECT_EQ(OK, callback.WaitForResult());
8878 8880
(...skipping 4677 matching lines...) Expand 10 before | Expand all | Expand 10 after
13556 ASSERT_TRUE(response); 13558 ASSERT_TRUE(response);
13557 ASSERT_TRUE(response->headers.get()); 13559 ASSERT_TRUE(response->headers.get());
13558 13560
13559 EXPECT_EQ(101, response->headers->response_code()); 13561 EXPECT_EQ(101, response->headers->response_code());
13560 13562
13561 trans.reset(); 13563 trans.reset();
13562 session->CloseAllConnections(); 13564 session->CloseAllConnections();
13563 } 13565 }
13564 13566
13565 } // namespace net 13567 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698