QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef QUICHE_QUIC_TEST_TOOLS_MOCK_QUIC_DISPATCHER_H_ |
| 6 | #define QUICHE_QUIC_TEST_TOOLS_MOCK_QUIC_DISPATCHER_H_ |
| 7 | |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 8 | #include "net/third_party/quiche/src/quic/core/crypto/quic_crypto_server_config.h" |
| 9 | #include "net/third_party/quiche/src/quic/core/quic_config.h" |
| 10 | #include "net/third_party/quiche/src/quic/core/quic_packets.h" |
dschinazi | 580d30b | 2019-04-26 15:05:20 -0700 | [diff] [blame] | 11 | #include "net/third_party/quiche/src/quic/platform/api/quic_test.h" |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 12 | #include "net/third_party/quiche/src/quic/tools/quic_simple_dispatcher.h" |
| 13 | #include "net/third_party/quiche/src/quic/tools/quic_simple_server_backend.h" |
| 14 | |
| 15 | namespace quic { |
| 16 | namespace test { |
| 17 | |
| 18 | class MockQuicDispatcher : public QuicSimpleDispatcher { |
| 19 | public: |
| 20 | MockQuicDispatcher( |
| 21 | const QuicConfig* config, |
| 22 | const QuicCryptoServerConfig* crypto_config, |
| 23 | QuicVersionManager* version_manager, |
| 24 | std::unique_ptr<QuicConnectionHelperInterface> helper, |
| 25 | std::unique_ptr<QuicCryptoServerStream::Helper> session_helper, |
| 26 | std::unique_ptr<QuicAlarmFactory> alarm_factory, |
| 27 | QuicSimpleServerBackend* quic_simple_server_backend); |
| 28 | MockQuicDispatcher(const MockQuicDispatcher&) = delete; |
| 29 | MockQuicDispatcher& operator=(const MockQuicDispatcher&) = delete; |
| 30 | |
| 31 | ~MockQuicDispatcher() override; |
| 32 | |
| 33 | MOCK_METHOD3(ProcessPacket, |
| 34 | void(const QuicSocketAddress& server_address, |
| 35 | const QuicSocketAddress& client_address, |
| 36 | const QuicReceivedPacket& packet)); |
| 37 | }; |
| 38 | |
| 39 | } // namespace test |
| 40 | } // namespace quic |
| 41 | |
| 42 | #endif // QUICHE_QUIC_TEST_TOOLS_MOCK_QUIC_DISPATCHER_H_ |