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

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

Issue 471613002: Change how QUIC negotiates pacing from congestion feedback to QUIC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Add_max_bandwidth_max_bandwidth_timestamp_73055131
Patch Set: Created 6 years, 4 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
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 86
87 EXPECT_CALL(*connection_, SendConnectionCloseWithDetails( 87 EXPECT_CALL(*connection_, SendConnectionCloseWithDetails(
88 QUIC_INVALID_CRYPTO_MESSAGE_TYPE, "Expected REJ")); 88 QUIC_INVALID_CRYPTO_MESSAGE_TYPE, "Expected REJ"));
89 stream_->ProcessRawData(message_data_->data(), message_data_->length()); 89 stream_->ProcessRawData(message_data_->data(), message_data_->length());
90 } 90 }
91 91
92 TEST_F(QuicCryptoClientStreamTest, NegotiatedParameters) { 92 TEST_F(QuicCryptoClientStreamTest, NegotiatedParameters) {
93 CompleteCryptoHandshake(); 93 CompleteCryptoHandshake();
94 94
95 const QuicConfig* config = session_->config(); 95 const QuicConfig* config = session_->config();
96 EXPECT_EQ(FLAGS_enable_quic_pacing ? kPACE : kQBIC, 96 EXPECT_EQ(kQBIC, config->congestion_feedback());
97 config->congestion_feedback());
98 EXPECT_EQ(kDefaultTimeoutSecs, 97 EXPECT_EQ(kDefaultTimeoutSecs,
99 config->idle_connection_state_lifetime().ToSeconds()); 98 config->idle_connection_state_lifetime().ToSeconds());
100 EXPECT_EQ(kDefaultMaxStreamsPerConnection, 99 EXPECT_EQ(kDefaultMaxStreamsPerConnection,
101 config->max_streams_per_connection()); 100 config->max_streams_per_connection());
102 EXPECT_EQ(0, config->keepalive_timeout().ToSeconds()); 101 EXPECT_EQ(0, config->keepalive_timeout().ToSeconds());
103 102
104 const QuicCryptoNegotiatedParameters& crypto_params( 103 const QuicCryptoNegotiatedParameters& crypto_params(
105 stream_->crypto_negotiated_params()); 104 stream_->crypto_negotiated_params());
106 EXPECT_EQ(crypto_config_.aead[0], crypto_params.aead); 105 EXPECT_EQ(crypto_config_.aead[0], crypto_params.aead);
107 EXPECT_EQ(crypto_config_.kexs[0], crypto_params.key_exchange); 106 EXPECT_EQ(crypto_config_.kexs[0], crypto_params.key_exchange);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 CryptoHandshakeMessage server_config_update; 196 CryptoHandshakeMessage server_config_update;
198 server_config_update.set_tag(kSCUP); 197 server_config_update.set_tag(kSCUP);
199 scoped_ptr<QuicData> data( 198 scoped_ptr<QuicData> data(
200 CryptoFramer::ConstructHandshakeMessage(server_config_update)); 199 CryptoFramer::ConstructHandshakeMessage(server_config_update));
201 stream_->ProcessRawData(data->data(), data->length()); 200 stream_->ProcessRawData(data->data(), data->length());
202 } 201 }
203 202
204 } // namespace 203 } // namespace
205 } // namespace test 204 } // namespace test
206 } // namespace net 205 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698