OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/test_tools/mock_crypto_client_stream.h" | 5 #include "net/quic/test_tools/mock_crypto_client_stream.h" |
6 | 6 |
7 #include "net/quic/quic_client_session_base.h" | 7 #include "net/quic/quic_client_session_base.h" |
8 #include "net/quic/quic_session_key.h" | 8 #include "net/quic/quic_server_id.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
11 namespace net { | 11 namespace net { |
12 | 12 |
13 MockCryptoClientStream::MockCryptoClientStream( | 13 MockCryptoClientStream::MockCryptoClientStream( |
14 const QuicSessionKey& server_key, | 14 const QuicServerId& server_id, |
15 QuicClientSessionBase* session, | 15 QuicClientSessionBase* session, |
16 ProofVerifyContext* verify_context, | 16 ProofVerifyContext* verify_context, |
17 QuicCryptoClientConfig* crypto_config, | 17 QuicCryptoClientConfig* crypto_config, |
18 HandshakeMode handshake_mode, | 18 HandshakeMode handshake_mode, |
19 const ProofVerifyDetails* proof_verify_details) | 19 const ProofVerifyDetails* proof_verify_details) |
20 : QuicCryptoClientStream(server_key, session, verify_context, | 20 : QuicCryptoClientStream(server_id, session, verify_context, |
21 crypto_config), | 21 crypto_config), |
22 handshake_mode_(handshake_mode), | 22 handshake_mode_(handshake_mode), |
23 proof_verify_details_(proof_verify_details) { | 23 proof_verify_details_(proof_verify_details) { |
24 } | 24 } |
25 | 25 |
26 MockCryptoClientStream::~MockCryptoClientStream() { | 26 MockCryptoClientStream::~MockCryptoClientStream() { |
27 } | 27 } |
28 | 28 |
29 void MockCryptoClientStream::OnHandshakeMessage( | 29 void MockCryptoClientStream::OnHandshakeMessage( |
30 const CryptoHandshakeMessage& message) { | 30 const CryptoHandshakeMessage& message) { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 session()->config()->ProcessClientHello(msg, &error_details); | 90 session()->config()->ProcessClientHello(msg, &error_details); |
91 ASSERT_EQ(QUIC_NO_ERROR, error); | 91 ASSERT_EQ(QUIC_NO_ERROR, error); |
92 ASSERT_TRUE(session()->config()->negotiated()); | 92 ASSERT_TRUE(session()->config()->negotiated()); |
93 } | 93 } |
94 | 94 |
95 QuicClientSessionBase* MockCryptoClientStream::client_session() { | 95 QuicClientSessionBase* MockCryptoClientStream::client_session() { |
96 return reinterpret_cast<QuicClientSessionBase*>(session()); | 96 return reinterpret_cast<QuicClientSessionBase*>(session()); |
97 } | 97 } |
98 | 98 |
99 } // namespace net | 99 } // namespace net |
OLD | NEW |