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

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

Issue 1979763002: Landing Recent QUIC changes until Sun May 8 00:39:29 2016 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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_test.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 <memory> 7 #include <memory>
8 8
9 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h" 9 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h"
10 #include "net/quic/crypto/quic_decrypter.h" 10 #include "net/quic/crypto/quic_decrypter.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 &helper_, &alarm_factory_, connection_, stream(), server_options_); 55 &helper_, &alarm_factory_, connection_, stream(), server_options_);
56 } 56 }
57 57
58 void ConstructHandshakeMessage() { 58 void ConstructHandshakeMessage() {
59 CryptoFramer framer; 59 CryptoFramer framer;
60 message_data_.reset(framer.ConstructHandshakeMessage(message_)); 60 message_data_.reset(framer.ConstructHandshakeMessage(message_));
61 } 61 }
62 62
63 QuicCryptoClientStream* stream() { return session_->GetCryptoStream(); } 63 QuicCryptoClientStream* stream() { return session_->GetCryptoStream(); }
64 64
65 MockConnectionHelper helper_; 65 MockQuicConnectionHelper helper_;
66 MockAlarmFactory alarm_factory_; 66 MockAlarmFactory alarm_factory_;
67 PacketSavingConnection* connection_; 67 PacketSavingConnection* connection_;
68 std::unique_ptr<TestQuicSpdyClientSession> session_; 68 std::unique_ptr<TestQuicSpdyClientSession> session_;
69 QuicServerId server_id_; 69 QuicServerId server_id_;
70 CryptoHandshakeMessage message_; 70 CryptoHandshakeMessage message_;
71 std::unique_ptr<QuicData> message_data_; 71 std::unique_ptr<QuicData> message_data_;
72 QuicCryptoClientConfig crypto_config_; 72 QuicCryptoClientConfig crypto_config_;
73 CryptoTestUtils::FakeServerOptions server_options_; 73 CryptoTestUtils::FakeServerOptions server_options_;
74 }; 74 };
75 75
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 &server_connection_, &server_session); 300 &server_connection_, &server_session);
301 CHECK(server_session); 301 CHECK(server_session);
302 server_session_.reset(server_session); 302 server_session_.reset(server_session);
303 CryptoTestUtils::FakeServerOptions options; 303 CryptoTestUtils::FakeServerOptions options;
304 CryptoTestUtils::SetupCryptoServerConfigForTest( 304 CryptoTestUtils::SetupCryptoServerConfigForTest(
305 server_connection_->clock(), server_connection_->random_generator(), 305 server_connection_->clock(), server_connection_->random_generator(),
306 server_session_->config(), &server_crypto_config_, options); 306 server_session_->config(), &server_crypto_config_, options);
307 FLAGS_enable_quic_stateless_reject_support = true; 307 FLAGS_enable_quic_stateless_reject_support = true;
308 } 308 }
309 309
310 MockConnectionHelper helper_; 310 MockQuicConnectionHelper helper_;
311 MockAlarmFactory alarm_factory_; 311 MockAlarmFactory alarm_factory_;
312 312
313 // Client crypto stream state 313 // Client crypto stream state
314 PacketSavingConnection* client_connection_; 314 PacketSavingConnection* client_connection_;
315 std::unique_ptr<TestQuicSpdyClientSession> client_session_; 315 std::unique_ptr<TestQuicSpdyClientSession> client_session_;
316 QuicCryptoClientConfig client_crypto_config_; 316 QuicCryptoClientConfig client_crypto_config_;
317 317
318 // Server crypto stream state 318 // Server crypto stream state
319 PacketSavingConnection* server_connection_; 319 PacketSavingConnection* server_connection_;
320 std::unique_ptr<TestQuicSpdyServerSession> server_session_; 320 std::unique_ptr<TestQuicSpdyServerSession> server_session_;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 client_state->GetNextServerDesignatedConnectionId(); 352 client_state->GetNextServerDesignatedConnectionId();
353 QuicConnectionId expected_id = 353 QuicConnectionId expected_id =
354 server_session_->connection()->random_generator()->RandUint64(); 354 server_session_->connection()->random_generator()->RandUint64();
355 EXPECT_EQ(expected_id, server_designated_id); 355 EXPECT_EQ(expected_id, server_designated_id);
356 EXPECT_FALSE(client_state->has_server_designated_connection_id()); 356 EXPECT_FALSE(client_state->has_server_designated_connection_id());
357 } 357 }
358 358
359 } // namespace 359 } // namespace
360 } // namespace test 360 } // namespace test
361 } // namespace net 361 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_crypto_server_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698