Index: net/http/http_server_properties_impl_unittest.cc |
diff --git a/net/http/http_server_properties_impl_unittest.cc b/net/http/http_server_properties_impl_unittest.cc |
index 46cd0dfd0dd9153b58d6bc4ee630c72a67d71001..006df7bf1b430f32ee57459fedfa4d4cb5b48169 100644 |
--- a/net/http/http_server_properties_impl_unittest.cc |
+++ b/net/http/http_server_properties_impl_unittest.cc |
@@ -13,6 +13,7 @@ |
#include "base/values.h" |
#include "net/base/host_port_pair.h" |
#include "net/base/ip_address.h" |
+#include "net/http/http_network_session.h" |
#include "testing/gtest/include/gtest/gtest.h" |
#include "url/gurl.h" |
@@ -78,7 +79,13 @@ class HttpServerPropertiesImplTest : public testing::Test { |
const AlternativeService& alternative_service) { |
const base::Time expiration = |
base::Time::Now() + base::TimeDelta::FromDays(1); |
- return impl_.SetAlternativeService(origin, alternative_service, expiration); |
+ QuicVersionVector advertised_versions; |
+ if (alternative_service.protocol == kProtoQUIC) { |
+ advertised_versions = |
+ HttpNetworkSession::Params().quic_supported_versions; |
+ } |
+ return impl_.SetAlternativeService(origin, alternative_service, expiration, |
+ advertised_versions); |
} |
void MarkBrokenAndLetExpireAlternativeServiceNTimes( |
@@ -389,20 +396,20 @@ TEST_F(AlternateProtocolServerPropertiesTest, ExcludeOrigin) { |
AlternativeServiceInfoVector alternative_service_info_vector; |
base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1); |
// Same hostname, same port, TCP: should be ignored. |
- AlternativeServiceInfo alternative_service_info1(kProtoHTTP2, "foo", 443, |
- expiration); |
+ AlternativeServiceInfo alternative_service_info1( |
+ AlternativeService(kProtoHTTP2, "foo", 443), expiration); |
alternative_service_info_vector.push_back(alternative_service_info1); |
// Different hostname: GetAlternativeServiceInfos should return this one. |
- AlternativeServiceInfo alternative_service_info2(kProtoHTTP2, "bar", 443, |
- expiration); |
+ AlternativeServiceInfo alternative_service_info2( |
+ AlternativeService(kProtoHTTP2, "bar", 443), expiration); |
alternative_service_info_vector.push_back(alternative_service_info2); |
// Different port: GetAlternativeServiceInfos should return this one too. |
- AlternativeServiceInfo alternative_service_info3(kProtoHTTP2, "foo", 80, |
- expiration); |
+ AlternativeServiceInfo alternative_service_info3( |
+ AlternativeService(kProtoHTTP2, "foo", 80), expiration); |
alternative_service_info_vector.push_back(alternative_service_info3); |
// QUIC: GetAlternativeServices should return this one too. |
- AlternativeServiceInfo alternative_service_info4(kProtoQUIC, "foo", 443, |
- expiration); |
+ AlternativeServiceInfo alternative_service_info4( |
+ AlternativeService(kProtoQUIC, "foo", 443), expiration); |
alternative_service_info_vector.push_back(alternative_service_info4); |
url::SchemeHostPort test_server("https", "foo", 443); |
@@ -426,7 +433,8 @@ TEST_F(AlternateProtocolServerPropertiesTest, Set) { |
const base::Time now = base::Time::Now(); |
base::Time expiration1 = now + base::TimeDelta::FromDays(1); |
// 1st entry in the memory. |
- impl_.SetAlternativeService(test_server1, alternative_service1, expiration1); |
+ impl_.SetAlternativeService(test_server1, alternative_service1, expiration1, |
+ QuicVersionVector()); |
// |test_server2| has an alternative service, which will be |
// overwritten by SetAlternativeServiceServers(), because |