| Index: net/http/http_server_properties_manager_unittest.cc
|
| diff --git a/net/http/http_server_properties_manager_unittest.cc b/net/http/http_server_properties_manager_unittest.cc
|
| index 2f6b34d91003c5573f8c6acd9f0f5e8439ebc7bd..7d50be24225287960c7530509aca57f9ed6fec5e 100644
|
| --- a/net/http/http_server_properties_manager_unittest.cc
|
| +++ b/net/http/http_server_properties_manager_unittest.cc
|
| @@ -411,10 +411,11 @@ TEST_P(HttpServerPropertiesManagerTest,
|
|
|
| // Verify ServerNetworkStats.
|
| const ServerNetworkStats* stats2 =
|
| - http_server_props_manager_->GetServerNetworkStats(google_server);
|
| + http_server_props_manager_->GetServerNetworkStats(
|
| + google_scheme_host_port);
|
| EXPECT_EQ(10, stats2->srtt.ToInternalValue());
|
| const ServerNetworkStats* stats3 =
|
| - http_server_props_manager_->GetServerNetworkStats(mail_server);
|
| + http_server_props_manager_->GetServerNetworkStats(mail_scheme_host_port);
|
| EXPECT_EQ(20, stats3->srtt.ToInternalValue());
|
|
|
| // Verify QuicServerInfo.
|
| @@ -507,7 +508,7 @@ TEST_P(HttpServerPropertiesManagerTest, BadCachedHostPortPair) {
|
| HasAlternativeService(HostPortPair::FromString("www.google.com:65536")));
|
| const ServerNetworkStats* stats1 =
|
| http_server_props_manager_->GetServerNetworkStats(
|
| - HostPortPair::FromString("www.google.com:65536"));
|
| + google_scheme_host_port);
|
| EXPECT_EQ(nullptr, stats1);
|
| EXPECT_EQ(0u, http_server_props_manager_->quic_server_info_map().size());
|
| }
|
| @@ -850,7 +851,7 @@ TEST_P(HttpServerPropertiesManagerTest, ServerNetworkStats) {
|
| ExpectPrefsUpdate();
|
| ExpectScheduleUpdatePrefsOnNetworkThread();
|
|
|
| - HostPortPair mail_server("mail.google.com", 80);
|
| + url::SchemeHostPort mail_server("http", "mail.google.com", 80);
|
| const ServerNetworkStats* stats =
|
| http_server_props_manager_->GetServerNetworkStats(mail_server);
|
| EXPECT_EQ(nullptr, stats);
|
| @@ -905,7 +906,7 @@ TEST_P(HttpServerPropertiesManagerTest, Clear) {
|
| http_server_props_manager_->SetSupportsQuic(true, actual_address);
|
| ServerNetworkStats stats;
|
| stats.srtt = base::TimeDelta::FromMicroseconds(10);
|
| - http_server_props_manager_->SetServerNetworkStats(spdy_server_mail, stats);
|
| + http_server_props_manager_->SetServerNetworkStats(spdy_server, stats);
|
|
|
| QuicServerId mail_quic_server_id("mail.google.com", 80);
|
| std::string quic_server_info1("quic_server_info1");
|
| @@ -926,7 +927,7 @@ TEST_P(HttpServerPropertiesManagerTest, Clear) {
|
| EXPECT_TRUE(http_server_props_manager_->GetSupportsQuic(&address));
|
| EXPECT_EQ(actual_address, address);
|
| const ServerNetworkStats* stats1 =
|
| - http_server_props_manager_->GetServerNetworkStats(spdy_server_mail);
|
| + http_server_props_manager_->GetServerNetworkStats(spdy_server);
|
| EXPECT_EQ(10, stats1->srtt.ToInternalValue());
|
| EXPECT_EQ(quic_server_info1, *http_server_props_manager_->GetQuicServerInfo(
|
| mail_quic_server_id));
|
| @@ -954,7 +955,7 @@ TEST_P(HttpServerPropertiesManagerTest, Clear) {
|
| EXPECT_FALSE(HasAlternativeService(spdy_server_mail));
|
| EXPECT_FALSE(http_server_props_manager_->GetSupportsQuic(&address));
|
| const ServerNetworkStats* stats2 =
|
| - http_server_props_manager_->GetServerNetworkStats(spdy_server_mail);
|
| + http_server_props_manager_->GetServerNetworkStats(spdy_server);
|
| EXPECT_EQ(nullptr, stats2);
|
| EXPECT_EQ(nullptr,
|
| http_server_props_manager_->GetQuicServerInfo(mail_quic_server_id));
|
| @@ -1052,7 +1053,7 @@ TEST_P(HttpServerPropertiesManagerTest, UpdateCacheWithPrefs) {
|
| ExpectScheduleUpdatePrefsOnNetworkThreadRepeatedly();
|
|
|
| const HostPortPair server_www("www.google.com", 80);
|
| - const HostPortPair server_mail("mail.google.com", 80);
|
| + const url::SchemeHostPort server_mail("http", "mail.google.com", 80);
|
|
|
| // Set alternate protocol.
|
| AlternativeServiceInfoVector alternative_service_info_vector;
|
| @@ -1074,7 +1075,8 @@ TEST_P(HttpServerPropertiesManagerTest, UpdateCacheWithPrefs) {
|
| 444);
|
| base::Time expiration3 = base::Time::Max();
|
| http_server_props_manager_->SetAlternativeService(
|
| - server_mail, mail_alternative_service, expiration3);
|
| + HostPortPair(server_mail.host(), server_mail.port()),
|
| + mail_alternative_service, expiration3);
|
|
|
| // Set ServerNetworkStats.
|
| ServerNetworkStats stats;
|
|
|