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 99647b3fef9aedeb01cecc864cc8ccb49e1fbe73..d021fc502190e249ae579edfc5e0a60c9105089a 100644 |
--- a/net/http/http_server_properties_manager_unittest.cc |
+++ b/net/http/http_server_properties_manager_unittest.cc |
@@ -223,9 +223,10 @@ TEST_F(HttpServerPropertiesManagerTest, |
Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); |
// Verify SupportsSpdy. |
- EXPECT_TRUE(http_server_props_manager_->SupportsSpdy(google_server)); |
- EXPECT_TRUE(http_server_props_manager_->SupportsSpdy(mail_server)); |
- EXPECT_FALSE(http_server_props_manager_->SupportsSpdy( |
+ EXPECT_TRUE( |
+ http_server_props_manager_->SupportsRequestPriority(google_server)); |
+ EXPECT_TRUE(http_server_props_manager_->SupportsRequestPriority(mail_server)); |
+ EXPECT_FALSE(http_server_props_manager_->SupportsRequestPriority( |
HostPortPair::FromString("foo.google.com:1337"))); |
// Verify AlternateProtocol. |
@@ -304,7 +305,7 @@ TEST_F(HttpServerPropertiesManagerTest, BadCachedHostPortPair) { |
Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); |
// Verify that nothing is set. |
- EXPECT_FALSE(http_server_props_manager_->SupportsSpdy( |
+ EXPECT_FALSE(http_server_props_manager_->SupportsRequestPriority( |
HostPortPair::FromString("www.google.com:65536"))); |
EXPECT_FALSE(http_server_props_manager_->HasAlternateProtocol( |
HostPortPair::FromString("www.google.com:65536"))); |
@@ -363,13 +364,15 @@ TEST_F(HttpServerPropertiesManagerTest, SupportsSpdy) { |
// Add mail.google.com:443 as a supporting spdy server. |
HostPortPair spdy_server_mail("mail.google.com", 443); |
- EXPECT_FALSE(http_server_props_manager_->SupportsSpdy(spdy_server_mail)); |
+ EXPECT_FALSE( |
+ http_server_props_manager_->SupportsRequestPriority(spdy_server_mail)); |
http_server_props_manager_->SetSupportsSpdy(spdy_server_mail, true); |
// Run the task. |
base::RunLoop().RunUntilIdle(); |
- EXPECT_TRUE(http_server_props_manager_->SupportsSpdy(spdy_server_mail)); |
+ EXPECT_TRUE( |
+ http_server_props_manager_->SupportsRequestPriority(spdy_server_mail)); |
Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); |
} |
@@ -481,7 +484,7 @@ TEST_F(HttpServerPropertiesManagerTest, HasAlternateProtocol) { |
EXPECT_FALSE( |
http_server_props_manager_->HasAlternateProtocol(spdy_server_mail)); |
http_server_props_manager_->SetAlternateProtocol(spdy_server_mail, 443, |
- NPN_SPDY_3, 1); |
+ NPN_SPDY_3, 1.0); |
// Run the task. |
base::RunLoop().RunUntilIdle(); |
@@ -541,7 +544,7 @@ TEST_F(HttpServerPropertiesManagerTest, Clear) { |
HostPortPair spdy_server_mail("mail.google.com", 443); |
http_server_props_manager_->SetSupportsSpdy(spdy_server_mail, true); |
http_server_props_manager_->SetAlternateProtocol(spdy_server_mail, 443, |
- NPN_SPDY_3, 1); |
+ NPN_SPDY_3, 1.0); |
http_server_props_manager_->SetSupportsQuic(spdy_server_mail, true, "foo"); |
ServerNetworkStats stats; |
stats.srtt = base::TimeDelta::FromMicroseconds(10); |
@@ -556,7 +559,8 @@ TEST_F(HttpServerPropertiesManagerTest, Clear) { |
// Run the task. |
base::RunLoop().RunUntilIdle(); |
- EXPECT_TRUE(http_server_props_manager_->SupportsSpdy(spdy_server_mail)); |
+ EXPECT_TRUE( |
+ http_server_props_manager_->SupportsRequestPriority(spdy_server_mail)); |
EXPECT_TRUE( |
http_server_props_manager_->HasAlternateProtocol(spdy_server_mail)); |
SupportsQuic supports_quic = |
@@ -585,7 +589,8 @@ TEST_F(HttpServerPropertiesManagerTest, Clear) { |
http_server_props_manager_->Clear(base::MessageLoop::QuitClosure()); |
base::RunLoop().Run(); |
- EXPECT_FALSE(http_server_props_manager_->SupportsSpdy(spdy_server_mail)); |
+ EXPECT_FALSE( |
+ http_server_props_manager_->SupportsRequestPriority(spdy_server_mail)); |
EXPECT_FALSE( |
http_server_props_manager_->HasAlternateProtocol(spdy_server_mail)); |
SupportsQuic supports_quic1 = |
@@ -603,7 +608,7 @@ TEST_F(HttpServerPropertiesManagerTest, Clear) { |
Mock::VerifyAndClearExpectations(http_server_props_manager_.get()); |
} |
-// crbug.com/444956: Add 200 alternate_protocol servers followed by |
+// https://crbug.com/444956: Add 200 alternate_protocol servers followed by |
// supports_quic and verify we have read supports_quic from prefs. |
TEST_F(HttpServerPropertiesManagerTest, BadSupportsQuic) { |
ExpectCacheUpdate(); |
@@ -650,18 +655,17 @@ TEST_F(HttpServerPropertiesManagerTest, BadSupportsQuic) { |
for (int i = 0; i < 200; ++i) { |
std::string server = StringPrintf("www.google.com:%d", i); |
ASSERT_TRUE(http_server_props_manager_->HasAlternateProtocol( |
- net::HostPortPair::FromString(server))); |
- net::AlternateProtocolInfo port_alternate_protocol = |
+ HostPortPair::FromString(server))); |
+ AlternateProtocolInfo port_alternate_protocol = |
http_server_props_manager_->GetAlternateProtocol( |
- net::HostPortPair::FromString(server)); |
+ HostPortPair::FromString(server)); |
EXPECT_EQ(i, port_alternate_protocol.port); |
- EXPECT_EQ(net::NPN_SPDY_3, port_alternate_protocol.protocol); |
+ EXPECT_EQ(NPN_SPDY_3, port_alternate_protocol.protocol); |
} |
// Verify SupportsQuic. |
- net::SupportsQuic supports_quic1 = |
- http_server_props_manager_->GetSupportsQuic( |
- net::HostPortPair::FromString("mail.google.com:80")); |
+ SupportsQuic supports_quic1 = http_server_props_manager_->GetSupportsQuic( |
+ HostPortPair::FromString("mail.google.com:80")); |
EXPECT_TRUE(supports_quic1.used_quic); |
EXPECT_EQ("bar", supports_quic1.address); |
} |