Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / net / quic / test_tools / mock_quic_dispatcher.h
blobe402df22b74b712746ab1a817d451f0f5342e5c0
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.
5 #ifndef NET_QUIC_TEST_TOOLS_MOCK_QUIC_DISPATCHER_H_
6 #define NET_QUIC_TEST_TOOLS_MOCK_QUIC_DISPATCHER_H_
8 #include "net/base/ip_endpoint.h"
9 #include "net/quic/crypto/quic_crypto_server_config.h"
10 #include "net/quic/quic_config.h"
11 #include "net/quic/quic_protocol.h"
12 #include "net/tools/quic/quic_dispatcher.h"
13 #include "testing/gmock/include/gmock/gmock.h"
15 namespace net {
16 namespace test {
18 class MockQuicDispatcher : public tools::QuicDispatcher {
19 public:
20 MockQuicDispatcher(const QuicConfig& config,
21 const QuicCryptoServerConfig* crypto_config,
22 PacketWriterFactory* packet_writer_factory,
23 QuicConnectionHelperInterface* helper);
25 ~MockQuicDispatcher() override;
27 MOCK_METHOD3(ProcessPacket, void(const IPEndPoint& server_address,
28 const IPEndPoint& client_address,
29 const QuicEncryptedPacket& packet));
31 private:
32 DISALLOW_COPY_AND_ASSIGN(MockQuicDispatcher);
35 } // namespace test
36 } // namespace net
38 #endif // NET_QUIC_TEST_TOOLS_MOCK_QUIC_DISPATCHER_H_