Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1017)

Unified Diff: net/quic/chromium/quic_network_transaction_unittest.cc

Issue 2373663002: Unify enum NextProto and enum AlternateProtocol. (Closed)
Patch Set: Fix compile errors. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/net.gypi ('k') | net/quic/chromium/quic_stream_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/chromium/quic_network_transaction_unittest.cc
diff --git a/net/quic/chromium/quic_network_transaction_unittest.cc b/net/quic/chromium/quic_network_transaction_unittest.cc
index f3581a7d3ad7e6cf0d281ad6fc16beb51373ccc3..6fe6e30c50e2650b488008affcdac6df99e91d74 100644
--- a/net/quic/chromium/quic_network_transaction_unittest.cc
+++ b/net/quic/chromium/quic_network_transaction_unittest.cc
@@ -51,10 +51,10 @@
#include "net/quic/test_tools/quic_test_utils.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/mock_client_socket_pool_manager.h"
+#include "net/socket/next_proto.h"
#include "net/socket/socket_performance_watcher.h"
#include "net/socket/socket_performance_watcher_factory.h"
#include "net/socket/socket_test_util.h"
-#include "net/socket/ssl_client_socket.h"
#include "net/spdy/spdy_frame_builder.h"
#include "net/spdy/spdy_framer.h"
#include "net/ssl/ssl_config_service_defaults.h"
@@ -567,7 +567,7 @@ class QuicNetworkTransactionTest
MockCryptoClientStream::HandshakeMode handshake_mode) {
crypto_client_stream_factory_.set_handshake_mode(handshake_mode);
url::SchemeHostPort server(request_.url);
- AlternativeService alternative_service(QUIC, server.host(), 443);
+ AlternativeService alternative_service(kProtoQUIC, server.host(), 443);
base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1);
http_server_properties_.SetAlternativeService(server, alternative_service,
expiration);
@@ -578,7 +578,7 @@ class QuicNetworkTransactionTest
const HostPortPair& alternative) {
crypto_client_stream_factory_.set_handshake_mode(handshake_mode);
url::SchemeHostPort server(request_.url);
- AlternativeService alternative_service(QUIC, alternative.host(),
+ AlternativeService alternative_service(kProtoQUIC, alternative.host(),
alternative.port());
base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1);
http_server_properties_.SetAlternativeService(server, alternative_service,
@@ -599,7 +599,7 @@ class QuicNetworkTransactionTest
const AlternativeServiceVector alternative_service_vector =
http_server_properties_.GetAlternativeServices(server);
EXPECT_EQ(1u, alternative_service_vector.size());
- EXPECT_EQ(QUIC, alternative_service_vector[0].protocol);
+ EXPECT_EQ(kProtoQUIC, alternative_service_vector[0].protocol);
}
void AddHangingNonAlternateProtocolSocketData() {
@@ -1416,7 +1416,7 @@ TEST_P(QuicNetworkTransactionTest, PoolByOrigin) {
// Set up alternative service entry to destination1.
url::SchemeHostPort server(request_.url);
- AlternativeService alternative_service(QUIC, destination1, 443);
+ AlternativeService alternative_service(kProtoQUIC, destination1, 443);
base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1);
http_server_properties_.SetAlternativeService(server, alternative_service,
expiration);
@@ -1425,7 +1425,7 @@ TEST_P(QuicNetworkTransactionTest, PoolByOrigin) {
SendRequestAndExpectQuicResponse("hello!");
// Set up alternative service entry to a different destination.
- alternative_service = AlternativeService(QUIC, destination2, 443);
+ alternative_service = AlternativeService(kProtoQUIC, destination2, 443);
http_server_properties_.SetAlternativeService(server, alternative_service,
expiration);
// Second request pools to existing connection with same QuicServerId,
@@ -1486,7 +1486,7 @@ TEST_P(QuicNetworkTransactionTest, PoolByDestination) {
const char destination2[] = "second.example.com";
// Set up alternative service for |origin1|.
- AlternativeService alternative_service1(QUIC, destination1, 443);
+ AlternativeService alternative_service1(kProtoQUIC, destination1, 443);
base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1);
http_server_properties_.SetAlternativeService(
url::SchemeHostPort(origin1), alternative_service1, expiration);
@@ -1495,7 +1495,7 @@ TEST_P(QuicNetworkTransactionTest, PoolByDestination) {
// the first one with a different destination as for |origin1|,
// the second one with the same. The second one should be used,
// because the request can be pooled to that one.
- AlternativeService alternative_service2(QUIC, destination2, 443);
+ AlternativeService alternative_service2(kProtoQUIC, destination2, 443);
AlternativeServiceInfoVector alternative_services;
alternative_services.push_back(
AlternativeServiceInfo(alternative_service2, expiration));
@@ -1627,7 +1627,7 @@ TEST_P(QuicNetworkTransactionTest, AlternativeServiceDifferentPort) {
http_server_properties_.GetAlternativeServices(http_server);
ASSERT_EQ(1u, alternative_service_vector.size());
const AlternativeService alternative_service = alternative_service_vector[0];
- EXPECT_EQ(QUIC, alternative_service_vector[0].protocol);
+ EXPECT_EQ(kProtoQUIC, alternative_service_vector[0].protocol);
EXPECT_EQ(kDefaultServerHostName, alternative_service_vector[0].host);
EXPECT_EQ(137, alternative_service_vector[0].port);
}
@@ -1661,7 +1661,7 @@ TEST_P(QuicNetworkTransactionTest, ConfirmAlternativeService) {
AddHangingNonAlternateProtocolSocketData();
CreateSession();
- AlternativeService alternative_service(QUIC,
+ AlternativeService alternative_service(kProtoQUIC,
HostPortPair::FromURL(request_.url));
http_server_properties_.MarkAlternativeServiceRecentlyBroken(
alternative_service);
@@ -2940,7 +2940,7 @@ class QuicNetworkTransactionWithDestinationTest
destination = HostPortPair(kDifferentHostname, 443);
break;
}
- AlternativeService alternative_service(QUIC, destination);
+ AlternativeService alternative_service(kProtoQUIC, destination);
base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1);
http_server_properties_.SetAlternativeService(
url::SchemeHostPort("https", origin, 443), alternative_service,
« no previous file with comments | « net/net.gypi ('k') | net/quic/chromium/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698