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

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

Issue 2886273002: Change GetAlternativeServies to return alternative service infos. (Closed)
Patch Set: address comments in ps #3 Created 3 years, 7 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
« no previous file with comments | « no previous file | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698