| 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 #ifndef NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ | 5 #ifndef NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ |
| 6 #define NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ | 6 #define NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include <stdarg.h> | 8 #include <stdarg.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // If channel_id_source_async is true then the client will use an async | 78 // If channel_id_source_async is true then the client will use an async |
| 79 // ChannelIDSource for testing. Ignored if channel_id_enabled is false. | 79 // ChannelIDSource for testing. Ignored if channel_id_enabled is false. |
| 80 bool channel_id_source_async; | 80 bool channel_id_source_async; |
| 81 | 81 |
| 82 // If token_binding_enabled is true, then the client will attempt to | 82 // If token_binding_enabled is true, then the client will attempt to |
| 83 // negotiate Token Binding. | 83 // negotiate Token Binding. |
| 84 bool token_binding_enabled; | 84 bool token_binding_enabled; |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 // returns: the number of client hellos that the client sent. | 87 // returns: the number of client hellos that the client sent. |
| 88 static int HandshakeWithFakeServer(MockQuicConnectionHelper* helper, | 88 static int HandshakeWithFakeServer(QuicConfig* server_quic_config, |
| 89 MockQuicConnectionHelper* helper, |
| 89 MockAlarmFactory* alarm_factory, | 90 MockAlarmFactory* alarm_factory, |
| 90 PacketSavingConnection* client_conn, | 91 PacketSavingConnection* client_conn, |
| 91 QuicCryptoClientStream* client, | 92 QuicCryptoClientStream* client, |
| 92 const FakeServerOptions& options); | 93 const FakeServerOptions& options); |
| 93 | 94 |
| 94 // returns: the number of client hellos that the client sent. | 95 // returns: the number of client hellos that the client sent. |
| 95 static int HandshakeWithFakeClient(MockQuicConnectionHelper* helper, | 96 static int HandshakeWithFakeClient(MockQuicConnectionHelper* helper, |
| 96 MockAlarmFactory* alarm_factory, | 97 MockAlarmFactory* alarm_factory, |
| 97 PacketSavingConnection* server_conn, | 98 PacketSavingConnection* server_conn, |
| 98 QuicCryptoServerStream* server, | 99 QuicCryptoServerStream* server, |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 QuicCryptoServerStream* server); | 210 QuicCryptoServerStream* server); |
| 210 | 211 |
| 211 DISALLOW_COPY_AND_ASSIGN(CryptoTestUtils); | 212 DISALLOW_COPY_AND_ASSIGN(CryptoTestUtils); |
| 212 }; | 213 }; |
| 213 | 214 |
| 214 } // namespace test | 215 } // namespace test |
| 215 | 216 |
| 216 } // namespace net | 217 } // namespace net |
| 217 | 218 |
| 218 #endif // NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ | 219 #endif // NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_ |
| OLD | NEW |