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

Unified Diff: net/quic/quic_stream_factory_test.cc

Issue 192583004: QUIC - use QuicSessionKey tuple (host, port, is_https) instead of server_hostname (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use QuicSessionKey as arg and delete server_hostname as arg Created 6 years, 9 months 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
Index: net/quic/quic_stream_factory_test.cc
diff --git a/net/quic/quic_stream_factory_test.cc b/net/quic/quic_stream_factory_test.cc
index f075ea91bdc7650f2e5139fb2c9f650c1394822f..f72517734f1839fc383077594c1eeb893be608c6 100644
--- a/net/quic/quic_stream_factory_test.cc
+++ b/net/quic/quic_stream_factory_test.cc
@@ -1029,8 +1029,9 @@ TEST_P(QuicStreamFactoryTest, SharedCryptoConfig) {
QuicStreamFactoryPeer::GetOrCreateCryptoConfig(
&factory_, host_port_pair1, is_https_);
DCHECK(crypto_config1);
+ QuicSessionKey session_key1(host_port_pair1, is_https_);
QuicCryptoClientConfig::CachedState* cached1 =
- crypto_config1->LookupOrCreate(host_port_pair1.host());
+ crypto_config1->LookupOrCreate(session_key1);
EXPECT_FALSE(cached1->proof_valid());
EXPECT_TRUE(cached1->source_address_token().empty());
@@ -1044,8 +1045,9 @@ TEST_P(QuicStreamFactoryTest, SharedCryptoConfig) {
QuicStreamFactoryPeer::GetOrCreateCryptoConfig(
&factory_, host_port_pair2, is_https_);
DCHECK(crypto_config2);
+ QuicSessionKey session_key2(host_port_pair2, is_https_);
QuicCryptoClientConfig::CachedState* cached2 =
- crypto_config2->LookupOrCreate(host_port_pair2.host());
+ crypto_config2->LookupOrCreate(session_key2);
EXPECT_EQ(cached1->source_address_token(), cached2->source_address_token());
EXPECT_TRUE(cached2->proof_valid());
}
@@ -1067,8 +1069,9 @@ TEST_P(QuicStreamFactoryTest, CryptoConfigWhenProofIsInvalid) {
QuicStreamFactoryPeer::GetOrCreateCryptoConfig(
&factory_, host_port_pair1, is_https_);
DCHECK(crypto_config1);
+ QuicSessionKey session_key1(host_port_pair1, is_https_);
QuicCryptoClientConfig::CachedState* cached1 =
- crypto_config1->LookupOrCreate(host_port_pair1.host());
+ crypto_config1->LookupOrCreate(session_key1);
EXPECT_FALSE(cached1->proof_valid());
EXPECT_TRUE(cached1->source_address_token().empty());
@@ -1082,8 +1085,9 @@ TEST_P(QuicStreamFactoryTest, CryptoConfigWhenProofIsInvalid) {
QuicStreamFactoryPeer::GetOrCreateCryptoConfig(
&factory_, host_port_pair2, is_https_);
DCHECK(crypto_config2);
+ QuicSessionKey session_key2(host_port_pair2, is_https_);
QuicCryptoClientConfig::CachedState* cached2 =
- crypto_config2->LookupOrCreate(host_port_pair2.host());
+ crypto_config2->LookupOrCreate(session_key2);
EXPECT_NE(cached1->source_address_token(), cached2->source_address_token());
EXPECT_TRUE(cached2->source_address_token().empty());
EXPECT_FALSE(cached2->proof_valid());

Powered by Google App Engine
This is Rietveld 408576698