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

Side by Side Diff: net/quic/quic_crypto_client_stream_test.cc

Issue 312553003: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_crypto_client_stream.cc ('k') | net/quic/quic_flow_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_crypto_client_stream.h" 5 #include "net/quic/quic_crypto_client_stream.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h" 8 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h"
9 #include "net/quic/crypto/quic_decrypter.h" 9 #include "net/quic/crypto/quic_decrypter.h"
10 #include "net/quic/crypto/quic_encrypter.h" 10 #include "net/quic/crypto/quic_encrypter.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 EXPECT_CALL(*connection_, SendConnectionCloseWithDetails( 86 EXPECT_CALL(*connection_, SendConnectionCloseWithDetails(
87 QUIC_INVALID_CRYPTO_MESSAGE_TYPE, "Expected REJ")); 87 QUIC_INVALID_CRYPTO_MESSAGE_TYPE, "Expected REJ"));
88 stream_->ProcessRawData(message_data_->data(), message_data_->length()); 88 stream_->ProcessRawData(message_data_->data(), message_data_->length());
89 } 89 }
90 90
91 TEST_F(QuicCryptoClientStreamTest, NegotiatedParameters) { 91 TEST_F(QuicCryptoClientStreamTest, NegotiatedParameters) {
92 CompleteCryptoHandshake(); 92 CompleteCryptoHandshake();
93 93
94 const QuicConfig* config = session_->config(); 94 const QuicConfig* config = session_->config();
95 EXPECT_EQ(FLAGS_enable_quic_pacing ? kPACE : kQBIC, 95 EXPECT_EQ(FLAGS_enable_quic_pacing ? kPACE : kQBIC,
96 config->congestion_control()); 96 config->congestion_feedback());
97 EXPECT_EQ(kDefaultTimeoutSecs, 97 EXPECT_EQ(kDefaultTimeoutSecs,
98 config->idle_connection_state_lifetime().ToSeconds()); 98 config->idle_connection_state_lifetime().ToSeconds());
99 EXPECT_EQ(kDefaultMaxStreamsPerConnection, 99 EXPECT_EQ(kDefaultMaxStreamsPerConnection,
100 config->max_streams_per_connection()); 100 config->max_streams_per_connection());
101 EXPECT_EQ(0, config->keepalive_timeout().ToSeconds()); 101 EXPECT_EQ(0, config->keepalive_timeout().ToSeconds());
102 102
103 const QuicCryptoNegotiatedParameters& crypto_params( 103 const QuicCryptoNegotiatedParameters& crypto_params(
104 stream_->crypto_negotiated_params()); 104 stream_->crypto_negotiated_params());
105 EXPECT_EQ(crypto_config_.aead[0], crypto_params.aead); 105 EXPECT_EQ(crypto_config_.aead[0], crypto_params.aead);
106 EXPECT_EQ(crypto_config_.kexs[0], crypto_params.key_exchange); 106 EXPECT_EQ(crypto_config_.kexs[0], crypto_params.key_exchange);
(...skipping 29 matching lines...) Expand all
136 136
137 // Check that a client hello was sent and that CryptoConnect doesn't fail 137 // Check that a client hello was sent and that CryptoConnect doesn't fail
138 // with an error. 138 // with an error.
139 EXPECT_TRUE(stream_->CryptoConnect()); 139 EXPECT_TRUE(stream_->CryptoConnect());
140 ASSERT_EQ(1u, connection_->packets_.size()); 140 ASSERT_EQ(1u, connection_->packets_.size());
141 } 141 }
142 142
143 } // namespace 143 } // namespace
144 } // namespace test 144 } // namespace test
145 } // namespace net 145 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_client_stream.cc ('k') | net/quic/quic_flow_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698