summaryrefslogtreecommitdiffstats
path: root/net/http/http_server_properties_manager_unittest.cc
diff options
context:
space:
mode:
authorbnc <bnc@chromium.org>2015-04-03 10:15:47 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-03 17:17:04 +0000
commit6d9b2f470073c2125c1e085e38efa7710d94aca1 (patch)
tree7eaa9b24a774af03b89e807902c24ffa1b69fa32 /net/http/http_server_properties_manager_unittest.cc
parent1a16f9bf016a616d12be7003ebe84fb1aebc748e (diff)
downloadchromium_src-6d9b2f470073c2125c1e085e38efa7710d94aca1.zip
chromium_src-6d9b2f470073c2125c1e085e38efa7710d94aca1.tar.gz
chromium_src-6d9b2f470073c2125c1e085e38efa7710d94aca1.tar.bz2
s/NPN_SPDY_3/NPN_SPDY_4/g in tests.
Since SPDY/3 is deprecated, replace it with HTTP/2 (also known as SPDY/4 internally) in tests. This is not critical as they are the negotiated protocols are not actually used in the tests affected by this CL, but it is a prerequisite to removing NPN_SPDY_3 enum value from the codebase. BUG=428086 Review URL: https://codereview.chromium.org/1059243003 Cr-Commit-Position: refs/heads/master@{#323759}
Diffstat (limited to 'net/http/http_server_properties_manager_unittest.cc')
-rw-r--r--net/http/http_server_properties_manager_unittest.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/http/http_server_properties_manager_unittest.cc b/net/http/http_server_properties_manager_unittest.cc
index 9394485..fb548bc 100644
--- a/net/http/http_server_properties_manager_unittest.cc
+++ b/net/http/http_server_properties_manager_unittest.cc
@@ -165,7 +165,7 @@ TEST_F(HttpServerPropertiesManagerTest,
// Set up alternative_service for www.google.com:80.
base::DictionaryValue* alternative_service_dict = new base::DictionaryValue;
- alternative_service_dict->SetString("protocol_str", "npn-spdy/3");
+ alternative_service_dict->SetString("protocol_str", "npn-h2");
alternative_service_dict->SetString("host", "maps.google.com");
alternative_service_dict->SetInteger("port", 443);
base::ListValue* alternative_service_list = new base::ListValue;
@@ -235,7 +235,7 @@ TEST_F(HttpServerPropertiesManagerTest,
// Verify alternative service.
AlternativeService alternative_service =
http_server_props_manager_->GetAlternativeService(google_server);
- EXPECT_EQ(NPN_SPDY_3, alternative_service.protocol);
+ EXPECT_EQ(NPN_SPDY_4, alternative_service.protocol);
EXPECT_EQ("maps.google.com", alternative_service.host);
EXPECT_EQ(443, alternative_service.port);
alternative_service =
@@ -477,7 +477,7 @@ TEST_F(HttpServerPropertiesManagerTest, GetAlternativeService) {
HostPortPair spdy_server_mail("mail.google.com", 80);
EXPECT_FALSE(HasAlternativeService(spdy_server_mail));
- AlternativeService alternative_service(NPN_SPDY_3, "mail.google.com", 443);
+ AlternativeService alternative_service(NPN_SPDY_4, "mail.google.com", 443);
http_server_props_manager_->SetAlternativeService(spdy_server_mail,
alternative_service, 1.0);
@@ -488,7 +488,7 @@ TEST_F(HttpServerPropertiesManagerTest, GetAlternativeService) {
alternative_service =
http_server_props_manager_->GetAlternativeService(spdy_server_mail);
EXPECT_EQ(443, alternative_service.port);
- EXPECT_EQ(NPN_SPDY_3, alternative_service.protocol);
+ EXPECT_EQ(NPN_SPDY_4, alternative_service.protocol);
}
TEST_F(HttpServerPropertiesManagerTest, SupportsQuic) {
@@ -534,7 +534,7 @@ TEST_F(HttpServerPropertiesManagerTest, Clear) {
HostPortPair spdy_server_mail("mail.google.com", 443);
http_server_props_manager_->SetSupportsSpdy(spdy_server_mail, true);
- AlternativeService alternative_service(NPN_SPDY_3, "mail.google.com", 443);
+ AlternativeService alternative_service(NPN_SPDY_4, "mail.google.com", 443);
http_server_props_manager_->SetAlternativeService(spdy_server_mail,
alternative_service, 1.0);
IPAddressNumber actual_address;
@@ -606,7 +606,7 @@ TEST_F(HttpServerPropertiesManagerTest, BadSupportsQuic) {
for (int i = 0; i < 200; ++i) {
// Set up alternative_service for www.google.com:i.
base::DictionaryValue* alternative_service_dict = new base::DictionaryValue;
- alternative_service_dict->SetString("protocol_str", "npn-spdy/3");
+ alternative_service_dict->SetString("protocol_str", "npn-h2");
alternative_service_dict->SetString("host", "");
alternative_service_dict->SetInteger("port", i);
base::ListValue* alternative_service_list = new base::ListValue;
@@ -651,7 +651,7 @@ TEST_F(HttpServerPropertiesManagerTest, BadSupportsQuic) {
http_server_props_manager_->GetAlternativeService(
HostPortPair::FromString(server));
EXPECT_EQ(i, alternative_service.port);
- EXPECT_EQ(NPN_SPDY_3, alternative_service.protocol);
+ EXPECT_EQ(NPN_SPDY_4, alternative_service.protocol);
}
// Verify SupportsQuic.
@@ -665,7 +665,7 @@ TEST_F(HttpServerPropertiesManagerTest, UpdateCacheWithPrefs) {
const HostPortPair server_mail("mail.google.com", 80);
// Set alternate protocol.
- AlternativeService www_altsvc(NPN_SPDY_3, "", 443);
+ AlternativeService www_altsvc(NPN_SPDY_4, "", 443);
AlternativeService mail_altsvc(NPN_SPDY_3_1, "mail.google.com", 444);
http_server_props_manager_->SetAlternativeService(server_www, www_altsvc,
1.0);
@@ -696,7 +696,7 @@ TEST_F(HttpServerPropertiesManagerTest, UpdateCacheWithPrefs) {
"\"npn-spdy/"
"3.1\"}],\"network_stats\":{\"srtt\":42}},\"www.google.com:80\":"
"{\"alternative_service\":[{\"port\":443,\"probability\":1.0,"
- "\"protocol_str\":\"npn-spdy/3\"}]}},\"supports_quic\":"
+ "\"protocol_str\":\"npn-h2\"}]}},\"supports_quic\":"
"{\"address\":\"127.0.0.1\",\"used_quic\":true},\"version\":3}";
const base::Value* http_server_properties =