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

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

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 EXPECT_CALL(*connection_, SendConnectionCloseWithDetails( 89 EXPECT_CALL(*connection_, SendConnectionCloseWithDetails(
90 QUIC_INVALID_CRYPTO_MESSAGE_TYPE, "Expected REJ")); 90 QUIC_INVALID_CRYPTO_MESSAGE_TYPE, "Expected REJ"));
91 stream_->ProcessRawData(message_data_->data(), message_data_->length()); 91 stream_->ProcessRawData(message_data_->data(), message_data_->length());
92 } 92 }
93 93
94 TEST_F(QuicCryptoClientStreamTest, NegotiatedParameters) { 94 TEST_F(QuicCryptoClientStreamTest, NegotiatedParameters) {
95 CompleteCryptoHandshake(); 95 CompleteCryptoHandshake();
96 96
97 const QuicConfig* config = session_->config(); 97 const QuicConfig* config = session_->config();
98 EXPECT_EQ(kQBIC, config->CongestionFeedback());
99 EXPECT_EQ(kMaximumIdleTimeoutSecs, 98 EXPECT_EQ(kMaximumIdleTimeoutSecs,
100 config->IdleConnectionStateLifetime().ToSeconds()); 99 config->IdleConnectionStateLifetime().ToSeconds());
101 EXPECT_EQ(kDefaultMaxStreamsPerConnection, 100 EXPECT_EQ(kDefaultMaxStreamsPerConnection,
102 config->MaxStreamsPerConnection()); 101 config->MaxStreamsPerConnection());
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);
108 } 107 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 CryptoHandshakeMessage server_config_update; 194 CryptoHandshakeMessage server_config_update;
196 server_config_update.set_tag(kSCUP); 195 server_config_update.set_tag(kSCUP);
197 scoped_ptr<QuicData> data( 196 scoped_ptr<QuicData> data(
198 CryptoFramer::ConstructHandshakeMessage(server_config_update)); 197 CryptoFramer::ConstructHandshakeMessage(server_config_update));
199 stream_->ProcessRawData(data->data(), data->length()); 198 stream_->ProcessRawData(data->data(), data->length());
200 } 199 }
201 200
202 } // namespace 201 } // namespace
203 } // namespace test 202 } // namespace test
204 } // namespace net 203 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698