blob: 874ad216ca92b192dfd6b2f2a8470a076499f8e2 [file] [log] [blame]
wubf975eac2019-08-19 19:41:01 -07001// 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
11namespace quic {
12
13class 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
dmcardled70b99e2019-12-12 09:52:39 -080030 MOCK_METHOD1(ProcessPacketFromNetwork, void(quiche::QuicheStringPiece));
31 MOCK_METHOD1(ProcessPacketFromPeer, void(quiche::QuicheStringPiece));
wubf975eac2019-08-19 19:41:01 -070032};
33
34} // namespace quic
35
36#endif // QUICHE_QUIC_QBONE_MOCK_QBONE_SERVER_SESSION_H_