OLD | NEW |
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 Perspective::IS_CLIENT); | 44 Perspective::IS_CLIENT); |
45 // Advance the time, because timers do not like uninitialized times. | 45 // Advance the time, because timers do not like uninitialized times. |
46 connection_->AdvanceTime(QuicTime::Delta::FromSeconds(1)); | 46 connection_->AdvanceTime(QuicTime::Delta::FromSeconds(1)); |
47 | 47 |
48 session_.reset(new TestQuicSpdyClientSession( | 48 session_.reset(new TestQuicSpdyClientSession( |
49 connection_, DefaultQuicConfig(), server_id_, &crypto_config_)); | 49 connection_, DefaultQuicConfig(), server_id_, &crypto_config_)); |
50 } | 50 } |
51 | 51 |
52 void CompleteCryptoHandshake() { | 52 void CompleteCryptoHandshake() { |
53 stream()->CryptoConnect(); | 53 stream()->CryptoConnect(); |
54 CryptoTestUtils::HandshakeWithFakeServer( | 54 QuicConfig config; |
55 &helper_, &alarm_factory_, connection_, stream(), server_options_); | 55 CryptoTestUtils::HandshakeWithFakeServer(&config, &helper_, &alarm_factory_, |
| 56 connection_, stream(), |
| 57 server_options_); |
56 } | 58 } |
57 | 59 |
58 void ConstructHandshakeMessage() { | 60 void ConstructHandshakeMessage() { |
59 CryptoFramer framer; | 61 CryptoFramer framer; |
60 message_data_.reset(framer.ConstructHandshakeMessage(message_)); | 62 message_data_.reset(framer.ConstructHandshakeMessage(message_)); |
61 } | 63 } |
62 | 64 |
63 QuicCryptoClientStream* stream() { return session_->GetCryptoStream(); } | 65 QuicCryptoClientStream* stream() { return session_->GetCryptoStream(); } |
64 | 66 |
65 MockQuicConnectionHelper helper_; | 67 MockQuicConnectionHelper helper_; |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 client_state->GetNextServerDesignatedConnectionId(); | 354 client_state->GetNextServerDesignatedConnectionId(); |
353 QuicConnectionId expected_id = | 355 QuicConnectionId expected_id = |
354 server_session_->connection()->random_generator()->RandUint64(); | 356 server_session_->connection()->random_generator()->RandUint64(); |
355 EXPECT_EQ(expected_id, server_designated_id); | 357 EXPECT_EQ(expected_id, server_designated_id); |
356 EXPECT_FALSE(client_state->has_server_designated_connection_id()); | 358 EXPECT_FALSE(client_state->has_server_designated_connection_id()); |
357 } | 359 } |
358 | 360 |
359 } // namespace | 361 } // namespace |
360 } // namespace test | 362 } // namespace test |
361 } // namespace net | 363 } // namespace net |
OLD | NEW |