| Index: net/quic/test_tools/mock_crypto_client_stream.cc
|
| diff --git a/net/quic/test_tools/mock_crypto_client_stream.cc b/net/quic/test_tools/mock_crypto_client_stream.cc
|
| index c63d0f01ede89057d0aa0df4a08a951ad3e14e97..8ac7c12641366761cd2c78349e649a5590b34fb2 100644
|
| --- a/net/quic/test_tools/mock_crypto_client_stream.cc
|
| +++ b/net/quic/test_tools/mock_crypto_client_stream.cc
|
| @@ -10,8 +10,10 @@ MockCryptoClientStream::MockCryptoClientStream(
|
| const string& server_hostname,
|
| const QuicConfig& config,
|
| QuicSession* session,
|
| - QuicCryptoClientConfig* crypto_config)
|
| - : QuicCryptoClientStream(server_hostname, config, session, crypto_config) {
|
| + QuicCryptoClientConfig* crypto_config,
|
| + HandshakeMode handshake_mode)
|
| + : QuicCryptoClientStream(server_hostname, config, session, crypto_config),
|
| + handshake_mode_(handshake_mode) {
|
| }
|
|
|
| MockCryptoClientStream::~MockCryptoClientStream() {
|
| @@ -23,7 +25,17 @@ void MockCryptoClientStream::OnHandshakeMessage(
|
| }
|
|
|
| bool MockCryptoClientStream::CryptoConnect() {
|
| - SetHandshakeComplete(QUIC_NO_ERROR);
|
| + if (handshake_mode_ == ZERO_RTT) {
|
| + encryption_established_ = true;
|
| + handshake_confirmed_ = false;
|
| + session()->OnCryptoHandshakeEvent(
|
| + QuicSession::ENCRYPTION_FIRST_ESTABLISHED);
|
| + return true;
|
| + }
|
| +
|
| + encryption_established_ = true;
|
| + handshake_confirmed_ = true;
|
| + session()->OnCryptoHandshakeEvent(QuicSession::HANDSHAKE_CONFIRMED);
|
| return true;
|
| }
|
|
|
|
|