xref: /aosp_15_r20/external/cronet/net/third_party/quiche/src/quiche/quic/qbone/mock_qbone_server_session.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
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 "quiche/quic/platform/api/quic_test.h"
9 #include "quiche/quic/qbone/qbone_server_session.h"
10 
11 namespace quic {
12 
13 class MockQboneServerSession : public QboneServerSession {
14  public:
MockQboneServerSession(QuicConnection * connection)15   explicit MockQboneServerSession(QuicConnection* connection)
16       : QboneServerSession(CurrentSupportedVersions(), connection,
17                            /*owner=*/nullptr,
18                            /*config=*/{},
19                            /*quic_crypto_server_config=*/nullptr,
20                            /*compressed_certs_cache=*/nullptr,
21                            /*writer=*/nullptr,
22                            /*self_ip=*/QuicIpAddress::Loopback6(),
23                            /*client_ip=*/QuicIpAddress::Loopback6(),
24                            /*client_ip_subnet_length=*/0,
25                            /*handler=*/nullptr) {}
26 
27   MOCK_METHOD(bool, SendClientRequest, (const QboneClientRequest&), (override));
28 
29   MOCK_METHOD(void, ProcessPacketFromNetwork, (absl::string_view), (override));
30   MOCK_METHOD(void, ProcessPacketFromPeer, (absl::string_view), (override));
31 };
32 
33 }  // namespace quic
34 
35 #endif  // QUICHE_QUIC_QBONE_MOCK_QBONE_SERVER_SESSION_H_
36