summaryrefslogtreecommitdiff
path: root/chromium/net/third_party/quiche/src/quic/qbone/mock_qbone_server_session.h
blob: 8d4f64eda24f349c1a94b73fb0bbdc5286e8dfa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef QUICHE_QUIC_QBONE_MOCK_QBONE_SERVER_SESSION_H_
#define QUICHE_QUIC_QBONE_MOCK_QBONE_SERVER_SESSION_H_

#include "quic/platform/api/quic_test.h"
#include "quic/qbone/qbone_server_session.h"

namespace quic {

class MockQboneServerSession : public QboneServerSession {
 public:
  explicit MockQboneServerSession(QuicConnection* connection)
      : QboneServerSession(CurrentSupportedVersions(),
                           connection,
                           /*owner=*/nullptr,
                           /*config=*/{},
                           /*quic_crypto_server_config=*/nullptr,
                           /*compressed_certs_cache=*/nullptr,
                           /*writer=*/nullptr,
                           /*self_ip=*/QuicIpAddress::Loopback6(),
                           /*client_ip=*/QuicIpAddress::Loopback6(),
                           /*client_ip_subnet_length=*/0,
                           /*handler=*/nullptr) {}

  MOCK_METHOD(bool, SendClientRequest, (const QboneClientRequest&), (override));

  MOCK_METHOD(void, ProcessPacketFromNetwork, (absl::string_view), (override));
  MOCK_METHOD(void, ProcessPacketFromPeer, (absl::string_view), (override));
};

}  // namespace quic

#endif  // QUICHE_QUIC_QBONE_MOCK_QBONE_SERVER_SESSION_H_