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

Side by Side Diff: net/quic/quic_crypto_client_stream_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 unified diff | Download patch
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_crypto_server_stream.cc » ('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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 EXPECT_CALL(*connection_, 103 EXPECT_CALL(*connection_,
104 SendConnectionCloseWithDetails(QUIC_INVALID_CRYPTO_MESSAGE_TYPE, 104 SendConnectionCloseWithDetails(QUIC_INVALID_CRYPTO_MESSAGE_TYPE,
105 "Expected REJ")); 105 "Expected REJ"));
106 stream()->OnStreamFrame(QuicStreamFrame(kCryptoStreamId, /*fin=*/false, 106 stream()->OnStreamFrame(QuicStreamFrame(kCryptoStreamId, /*fin=*/false,
107 /*offset=*/0, 107 /*offset=*/0,
108 message_data_->AsStringPiece())); 108 message_data_->AsStringPiece()));
109 } 109 }
110 110
111 TEST_F(QuicCryptoClientStreamTest, NegotiatedParameters) { 111 TEST_F(QuicCryptoClientStreamTest, NegotiatedParameters) {
112 FLAGS_quic_use_rfc7539 = true;
113 CompleteCryptoHandshake(); 112 CompleteCryptoHandshake();
114 113
115 const QuicConfig* config = session_->config(); 114 const QuicConfig* config = session_->config();
116 EXPECT_EQ(kMaximumIdleTimeoutSecs, 115 EXPECT_EQ(kMaximumIdleTimeoutSecs,
117 config->IdleConnectionStateLifetime().ToSeconds()); 116 config->IdleConnectionStateLifetime().ToSeconds());
118 EXPECT_EQ(kDefaultMaxStreamsPerConnection, config->MaxStreamsPerConnection()); 117 EXPECT_EQ(kDefaultMaxStreamsPerConnection, config->MaxStreamsPerConnection());
119 118
120 const QuicCryptoNegotiatedParameters& crypto_params( 119 const QuicCryptoNegotiatedParameters& crypto_params(
121 stream()->crypto_negotiated_params()); 120 stream()->crypto_negotiated_params());
122 EXPECT_EQ(crypto_config_.aead[0], crypto_params.aead); 121 EXPECT_EQ(crypto_config_.aead[0], crypto_params.aead);
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 client_state->GetNextServerDesignatedConnectionId(); 347 client_state->GetNextServerDesignatedConnectionId();
349 QuicConnectionId expected_id = 348 QuicConnectionId expected_id =
350 server_session_->connection()->random_generator()->RandUint64(); 349 server_session_->connection()->random_generator()->RandUint64();
351 EXPECT_EQ(expected_id, server_designated_id); 350 EXPECT_EQ(expected_id, server_designated_id);
352 EXPECT_FALSE(client_state->has_server_designated_connection_id()); 351 EXPECT_FALSE(client_state->has_server_designated_connection_id());
353 } 352 }
354 353
355 } // namespace 354 } // namespace
356 } // namespace test 355 } // namespace test
357 } // namespace net 356 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_crypto_server_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698