wub | f975eac | 2019-08-19 19:41:01 -0700 | [diff] [blame] | 1 | // Copyright (c) 2019 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_QBONE_MOCK_QBONE_SERVER_SESSION_H_ |
| 6 | #define QUICHE_QUIC_QBONE_MOCK_QBONE_SERVER_SESSION_H_ |
| 7 | |
| 8 | #include "net/third_party/quiche/src/quic/platform/api/quic_test.h" |
| 9 | #include "net/third_party/quiche/src/quic/qbone/qbone_server_session.h" |
| 10 | |
| 11 | namespace quic { |
| 12 | |
| 13 | class MockQboneServerSession : public QboneServerSession { |
| 14 | public: |
| 15 | explicit MockQboneServerSession(QuicConnection* connection) |
| 16 | : QboneServerSession(CurrentSupportedVersions(), |
| 17 | connection, |
| 18 | /*owner=*/nullptr, |
| 19 | /*config=*/{}, |
| 20 | /*quic_crypto_server_config=*/nullptr, |
| 21 | /*compressed_certs_cache=*/nullptr, |
| 22 | /*writer=*/nullptr, |
| 23 | /*self_ip=*/QuicIpAddress::Loopback6(), |
| 24 | /*client_ip=*/QuicIpAddress::Loopback6(), |
| 25 | /*client_ip_subnet_length=*/0, |
| 26 | /*handler=*/nullptr) {} |
| 27 | |
| 28 | MOCK_METHOD1(SendClientRequest, bool(const QboneClientRequest&)); |
| 29 | |
dmcardle | d70b99e | 2019-12-12 09:52:39 -0800 | [diff] [blame] | 30 | MOCK_METHOD1(ProcessPacketFromNetwork, void(quiche::QuicheStringPiece)); |
| 31 | MOCK_METHOD1(ProcessPacketFromPeer, void(quiche::QuicheStringPiece)); |
wub | f975eac | 2019-08-19 19:41:01 -0700 | [diff] [blame] | 32 | }; |
| 33 | |
| 34 | } // namespace quic |
| 35 | |
| 36 | #endif // QUICHE_QUIC_QBONE_MOCK_QBONE_SERVER_SESSION_H_ |