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 <memory> | 5 #include <memory> |
6 #include <ostream> | 6 #include <ostream> |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 } | 552 } |
553 | 553 |
554 void CheckWasHttpResponse( | 554 void CheckWasHttpResponse( |
555 const std::unique_ptr<HttpNetworkTransaction>& trans) { | 555 const std::unique_ptr<HttpNetworkTransaction>& trans) { |
556 const HttpResponseInfo* response = trans->GetResponseInfo(); | 556 const HttpResponseInfo* response = trans->GetResponseInfo(); |
557 ASSERT_TRUE(response != nullptr); | 557 ASSERT_TRUE(response != nullptr); |
558 ASSERT_TRUE(response->headers.get() != nullptr); | 558 ASSERT_TRUE(response->headers.get() != nullptr); |
559 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); | 559 EXPECT_EQ("HTTP/1.1 200 OK", response->headers->GetStatusLine()); |
560 EXPECT_FALSE(response->was_fetched_via_spdy); | 560 EXPECT_FALSE(response->was_fetched_via_spdy); |
561 EXPECT_FALSE(response->was_npn_negotiated); | 561 EXPECT_FALSE(response->was_npn_negotiated); |
562 EXPECT_EQ(HttpResponseInfo::CONNECTION_INFO_HTTP1, | 562 EXPECT_EQ(HttpResponseInfo::CONNECTION_INFO_HTTP1_1, |
563 response->connection_info); | 563 response->connection_info); |
564 } | 564 } |
565 | 565 |
566 void CheckResponseData(const std::unique_ptr<HttpNetworkTransaction>& trans, | 566 void CheckResponseData(const std::unique_ptr<HttpNetworkTransaction>& trans, |
567 const std::string& expected) { | 567 const std::string& expected) { |
568 std::string response_data; | 568 std::string response_data; |
569 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data)); | 569 ASSERT_EQ(OK, ReadTransaction(trans.get(), &response_data)); |
570 EXPECT_EQ(expected, response_data); | 570 EXPECT_EQ(expected, response_data); |
571 } | 571 } |
572 | 572 |
(...skipping 2090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2663 AddHangingSocketData(); | 2663 AddHangingSocketData(); |
2664 | 2664 |
2665 SendRequestAndExpectQuicResponse(origin1_); | 2665 SendRequestAndExpectQuicResponse(origin1_); |
2666 SendRequestAndExpectQuicResponse(origin2_); | 2666 SendRequestAndExpectQuicResponse(origin2_); |
2667 | 2667 |
2668 EXPECT_TRUE(AllDataConsumed()); | 2668 EXPECT_TRUE(AllDataConsumed()); |
2669 } | 2669 } |
2670 | 2670 |
2671 } // namespace test | 2671 } // namespace test |
2672 } // namespace net | 2672 } // namespace net |
OLD | NEW |