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

Unified Diff: net/quic/crypto/quic_crypto_client_config_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: Merge with TOT 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/crypto/quic_crypto_client_config_test.cc
diff --git a/net/quic/crypto/quic_crypto_client_config_test.cc b/net/quic/crypto/quic_crypto_client_config_test.cc
index 12996fba570137b34149a4c405f111da07180b14..d151e0c329ef2ba6b05b4b8b58296a6b466d5137 100644
--- a/net/quic/crypto/quic_crypto_client_config_test.cc
+++ b/net/quic/crypto/quic_crypto_client_config_test.cc
@@ -5,6 +5,7 @@
#include "net/quic/crypto/quic_crypto_client_config.h"
#include "net/quic/crypto/proof_verifier.h"
+#include "net/quic/quic_session_key.h"
#include "net/quic/test_tools/quic_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -90,15 +91,16 @@ TEST(QuicCryptoClientConfigTest, ProcessServerDowngradeAttack) {
TEST(QuicCryptoClientConfigTest, InitializeFrom) {
QuicCryptoClientConfig config;
+ QuicSessionKey canonical_key1("www.google.com", 80, false);
QuicCryptoClientConfig::CachedState* state =
- config.LookupOrCreate("www.google.com");
+ config.LookupOrCreate(canonical_key1);
// TODO(rch): Populate other fields of |state|.
state->set_source_address_token("TOKEN");
state->SetProofValid();
- config.InitializeFrom("mail.google.com", "www.google.com", &config);
- QuicCryptoClientConfig::CachedState* other =
- config.LookupOrCreate("mail.google.com");
+ QuicSessionKey other_key("mail.google.com", 80, false);
+ config.InitializeFrom(other_key, canonical_key1, &config);
+ QuicCryptoClientConfig::CachedState* other = config.LookupOrCreate(other_key);
EXPECT_EQ(state->server_config(), other->server_config());
EXPECT_EQ(state->source_address_token(), other->source_address_token());

Powered by Google App Engine
This is Rietveld 408576698