vasilvv | dfbd3df | 2019-11-01 11:58:43 -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_TEST_TOOLS_QUIC_TRANSPORT_TEST_TOOLS_H_ |
| 6 | #define QUICHE_QUIC_TEST_TOOLS_QUIC_TRANSPORT_TEST_TOOLS_H_ |
| 7 | |
| 8 | #include "net/third_party/quiche/src/quic/platform/api/quic_test.h" |
| 9 | #include "net/third_party/quiche/src/quic/quic_transport/quic_transport_client_session.h" |
| 10 | #include "net/third_party/quiche/src/quic/quic_transport/quic_transport_server_session.h" |
| 11 | |
| 12 | namespace quic { |
| 13 | namespace test { |
| 14 | |
| 15 | class MockClientVisitor : public QuicTransportClientSession::ClientVisitor { |
| 16 | public: |
vasilvv | 467b422 | 2019-12-09 16:22:11 -0800 | [diff] [blame] | 17 | MOCK_METHOD0(OnSessionReady, void()); |
vasilvv | dfbd3df | 2019-11-01 11:58:43 -0700 | [diff] [blame] | 18 | MOCK_METHOD0(OnIncomingBidirectionalStreamAvailable, void()); |
| 19 | MOCK_METHOD0(OnIncomingUnidirectionalStreamAvailable, void()); |
vasilvv | da373d4 | 2020-01-16 12:36:27 -0800 | [diff] [blame] | 20 | MOCK_METHOD1(OnDatagramReceived, void(quiche::QuicheStringPiece)); |
vasilvv | ec038f1 | 2020-01-07 11:58:08 -0800 | [diff] [blame] | 21 | MOCK_METHOD0(OnCanCreateNewOutgoingBidirectionalStream, void()); |
| 22 | MOCK_METHOD0(OnCanCreateNewOutgoingUnidirectionalStream, void()); |
vasilvv | dfbd3df | 2019-11-01 11:58:43 -0700 | [diff] [blame] | 23 | }; |
| 24 | |
| 25 | class MockServerVisitor : public QuicTransportServerSession::ServerVisitor { |
| 26 | public: |
| 27 | MOCK_METHOD1(CheckOrigin, bool(url::Origin)); |
vasilvv | 7857189 | 2019-12-06 07:14:57 -0800 | [diff] [blame] | 28 | MOCK_METHOD1(ProcessPath, bool(const GURL&)); |
vasilvv | dfbd3df | 2019-11-01 11:58:43 -0700 | [diff] [blame] | 29 | }; |
| 30 | |
vasilvv | d88f162 | 2019-11-04 13:50:53 -0800 | [diff] [blame] | 31 | class MockStreamVisitor : public QuicTransportStream::Visitor { |
| 32 | public: |
| 33 | MOCK_METHOD0(OnCanRead, void()); |
| 34 | MOCK_METHOD0(OnFinRead, void()); |
| 35 | MOCK_METHOD0(OnCanWrite, void()); |
| 36 | }; |
| 37 | |
vasilvv | dfbd3df | 2019-11-01 11:58:43 -0700 | [diff] [blame] | 38 | } // namespace test |
| 39 | } // namespace quic |
| 40 | |
| 41 | #endif // QUICHE_QUIC_TEST_TOOLS_QUIC_TRANSPORT_TEST_TOOLS_H_ |