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

Unified Diff: net/quic/crypto/quic_crypto_client_config_test.cc

Issue 1811043002: Landing Recent QUIC changes until 2016-03-15 16:26 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add an export clause. Created 4 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
« no previous file with comments | « net/quic/crypto/crypto_server_test.cc ('k') | net/quic/crypto/quic_crypto_server_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 68e476c36fa543b6cfa4e9e37ef1d2ebf3fb952b..ec727e4a024d26f3f09c27e6e36c5544bc182d86 100644
--- a/net/quic/crypto/quic_crypto_client_config_test.cc
+++ b/net/quic/crypto/quic_crypto_client_config_test.cc
@@ -155,7 +155,7 @@ TEST(QuicCryptoClientConfigTest, InchoateChlo) {
QuicCryptoClientConfig config(CryptoTestUtils::ProofVerifierForTesting());
QuicCryptoNegotiatedParameters params;
CryptoHandshakeMessage msg;
- QuicServerId server_id("www.google.com", 80, PRIVACY_MODE_DISABLED);
+ QuicServerId server_id("www.google.com", 443, PRIVACY_MODE_DISABLED);
MockRandom rand;
config.FillInchoateClientHello(server_id, QuicVersionMax(), &state, &rand,
&params, &msg);
@@ -241,7 +241,7 @@ TEST(QuicCryptoClientConfigTest, FillClientHello) {
string error_details;
MockRandom rand;
CryptoHandshakeMessage chlo;
- QuicServerId server_id("www.google.com", 80, PRIVACY_MODE_DISABLED);
+ QuicServerId server_id("www.google.com", 443, PRIVACY_MODE_DISABLED);
config.FillClientHello(server_id, kConnectionId, QuicVersionMax(), &state,
QuicWallTime::Zero(), &rand,
nullptr, // channel_id_key
@@ -281,14 +281,15 @@ TEST(QuicCryptoClientConfigTest, ProcessServerDowngradeAttack) {
TEST(QuicCryptoClientConfigTest, InitializeFrom) {
QuicCryptoClientConfig config(CryptoTestUtils::ProofVerifierForTesting());
- QuicServerId canonical_server_id("www.google.com", 80, PRIVACY_MODE_DISABLED);
+ QuicServerId canonical_server_id("www.google.com", 443,
+ PRIVACY_MODE_DISABLED);
QuicCryptoClientConfig::CachedState* state =
config.LookupOrCreate(canonical_server_id);
// TODO(rch): Populate other fields of |state|.
state->set_source_address_token("TOKEN");
state->SetProofValid();
- QuicServerId other_server_id("mail.google.com", 80, PRIVACY_MODE_DISABLED);
+ QuicServerId other_server_id("mail.google.com", 443, PRIVACY_MODE_DISABLED);
config.InitializeFrom(other_server_id, canonical_server_id, &config);
QuicCryptoClientConfig::CachedState* other =
config.LookupOrCreate(other_server_id);
@@ -302,8 +303,8 @@ TEST(QuicCryptoClientConfigTest, InitializeFrom) {
TEST(QuicCryptoClientConfigTest, Canonical) {
QuicCryptoClientConfig config(CryptoTestUtils::ProofVerifierForTesting());
config.AddCanonicalSuffix(".google.com");
- QuicServerId canonical_id1("www.google.com", 80, PRIVACY_MODE_DISABLED);
- QuicServerId canonical_id2("mail.google.com", 80, PRIVACY_MODE_DISABLED);
+ QuicServerId canonical_id1("www.google.com", 443, PRIVACY_MODE_DISABLED);
+ QuicServerId canonical_id2("mail.google.com", 443, PRIVACY_MODE_DISABLED);
QuicCryptoClientConfig::CachedState* state =
config.LookupOrCreate(canonical_id1);
// TODO(rch): Populate other fields of |state|.
@@ -319,15 +320,15 @@ TEST(QuicCryptoClientConfigTest, Canonical) {
EXPECT_EQ(state->certs(), other->certs());
EXPECT_EQ(1u, other->generation_counter());
- QuicServerId different_id("mail.google.org", 80, PRIVACY_MODE_DISABLED);
+ QuicServerId different_id("mail.google.org", 443, PRIVACY_MODE_DISABLED);
EXPECT_TRUE(config.LookupOrCreate(different_id)->IsEmpty());
}
TEST(QuicCryptoClientConfigTest, CanonicalNotUsedIfNotValid) {
QuicCryptoClientConfig config(CryptoTestUtils::ProofVerifierForTesting());
config.AddCanonicalSuffix(".google.com");
- QuicServerId canonical_id1("www.google.com", 80, PRIVACY_MODE_DISABLED);
- QuicServerId canonical_id2("mail.google.com", 80, PRIVACY_MODE_DISABLED);
+ QuicServerId canonical_id1("www.google.com", 443, PRIVACY_MODE_DISABLED);
+ QuicServerId canonical_id2("mail.google.com", 443, PRIVACY_MODE_DISABLED);
QuicCryptoClientConfig::CachedState* state =
config.LookupOrCreate(canonical_id1);
// TODO(rch): Populate other fields of |state|.
@@ -340,7 +341,7 @@ TEST(QuicCryptoClientConfigTest, CanonicalNotUsedIfNotValid) {
TEST(QuicCryptoClientConfigTest, ClearCachedStates) {
QuicCryptoClientConfig config(CryptoTestUtils::ProofVerifierForTesting());
- QuicServerId server_id("www.google.com", 80, PRIVACY_MODE_DISABLED);
+ QuicServerId server_id("www.google.com", 443, PRIVACY_MODE_DISABLED);
QuicCryptoClientConfig::CachedState* state = config.LookupOrCreate(server_id);
// TODO(rch): Populate other fields of |state|.
vector<string> certs(1);
« no previous file with comments | « net/quic/crypto/crypto_server_test.cc ('k') | net/quic/crypto/quic_crypto_server_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698