diff options
author | bnc <bnc@chromium.org> | 2015-07-23 03:06:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-23 10:06:57 +0000 |
commit | 0bbb0262be0570bb4d9d06444c86ed84609afb1c (patch) | |
tree | 5c71a2f4f5b45f461fb3c7c79ccd26c19ba60f33 /net/http/http_server_properties_manager_unittest.cc | |
parent | a9f4ea80ae8877d5521084302f3aaff228b14e9e (diff) | |
download | chromium_src-0bbb0262be0570bb4d9d06444c86ed84609afb1c.zip chromium_src-0bbb0262be0570bb4d9d06444c86ed84609afb1c.tar.gz chromium_src-0bbb0262be0570bb4d9d06444c86ed84609afb1c.tar.bz2 |
Do not return alternative services equivalent to the origin in GetAlternativeServices().
If there is an alternative service equivalent to the origin (same host, same port, both TCP), this should not be returned by GetAlternativeServices(), because there is always an HttpStreamFactoryImpl::Job launched for the origin.
BUG=392576
Review URL: https://codereview.chromium.org/1224303002
Cr-Commit-Position: refs/heads/master@{#340065}
Diffstat (limited to 'net/http/http_server_properties_manager_unittest.cc')
-rw-r--r-- | net/http/http_server_properties_manager_unittest.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/http/http_server_properties_manager_unittest.cc b/net/http/http_server_properties_manager_unittest.cc index dbaedac..c1eb8d0 100644 --- a/net/http/http_server_properties_manager_unittest.cc +++ b/net/http/http_server_properties_manager_unittest.cc @@ -704,7 +704,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_HTTP_2, "mail.google.com", 443); + AlternativeService alternative_service(NPN_HTTP_2, "mail.google.com", 1234); http_server_props_manager_->SetAlternativeService(spdy_server_mail, alternative_service, 1.0); IPAddressNumber actual_address; @@ -776,7 +776,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-h2"); + alternative_service_dict->SetString("protocol_str", "quic"); alternative_service_dict->SetInteger("port", i); base::ListValue* alternative_service_list = new base::ListValue; alternative_service_list->Append(alternative_service_dict); @@ -820,7 +820,7 @@ TEST_F(HttpServerPropertiesManagerTest, BadSupportsQuic) { http_server_props_manager_->GetAlternativeServices( HostPortPair::FromString(server)); ASSERT_EQ(1u, alternative_service_vector.size()); - EXPECT_EQ(NPN_HTTP_2, alternative_service_vector[0].protocol); + EXPECT_EQ(QUIC, alternative_service_vector[0].protocol); EXPECT_EQ(i, alternative_service_vector[0].port); } |