OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/bidirectional_stream.h" | 5 #include "net/http/bidirectional_stream.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1647 EXPECT_EQ("200", response_headers.find(":status")->second); | 1647 EXPECT_EQ("200", response_headers.find(":status")->second); |
1648 EXPECT_EQ(alt_svc_header_value, response_headers.find("alt-svc")->second); | 1648 EXPECT_EQ(alt_svc_header_value, response_headers.find("alt-svc")->second); |
1649 EXPECT_EQ(0, delegate->on_data_sent_count()); | 1649 EXPECT_EQ(0, delegate->on_data_sent_count()); |
1650 EXPECT_EQ(kProtoHTTP2, delegate->GetProtocol()); | 1650 EXPECT_EQ(kProtoHTTP2, delegate->GetProtocol()); |
1651 EXPECT_EQ(kUploadData, delegate->data_received()); | 1651 EXPECT_EQ(kUploadData, delegate->data_received()); |
1652 EXPECT_EQ(CountWriteBytes(writes, arraysize(writes)), | 1652 EXPECT_EQ(CountWriteBytes(writes, arraysize(writes)), |
1653 delegate->GetTotalSentBytes()); | 1653 delegate->GetTotalSentBytes()); |
1654 EXPECT_EQ(CountReadBytes(reads, arraysize(reads)), | 1654 EXPECT_EQ(CountReadBytes(reads, arraysize(reads)), |
1655 delegate->GetTotalReceivedBytes()); | 1655 delegate->GetTotalReceivedBytes()); |
1656 | 1656 |
1657 AlternativeServiceVector alternative_service_vector = | 1657 AlternativeServiceInfoVector alternative_service_info_vector = |
1658 http_session_->http_server_properties()->GetAlternativeServices( | 1658 http_session_->http_server_properties()->GetAlternativeServiceInfos( |
1659 url::SchemeHostPort(default_url_)); | 1659 url::SchemeHostPort(default_url_)); |
1660 ASSERT_EQ(1u, alternative_service_vector.size()); | 1660 ASSERT_EQ(1u, alternative_service_info_vector.size()); |
1661 EXPECT_EQ(kProtoQUIC, alternative_service_vector[0].protocol); | 1661 AlternativeService alternative_service(kProtoQUIC, "www.example.org", 443); |
1662 EXPECT_EQ("www.example.org", alternative_service_vector[0].host); | 1662 EXPECT_EQ(alternative_service, |
1663 EXPECT_EQ(443, alternative_service_vector[0].port); | 1663 alternative_service_info_vector[0].alternative_service); |
1664 } | 1664 } |
1665 | 1665 |
1666 } // namespace net | 1666 } // namespace net |
OLD | NEW |