summaryrefslogtreecommitdiffstats
path: root/net/quic/test_tools/mock_quic_spdy_client_stream.h
blob: d5bd14f15b9ce4f663718640f3bd1034dac2b6e9 (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
// Copyright (c) 2016 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 NET_QUIC_TEST_TOOLS_MOCK_QUIC_SPDY_CLIENT_STREAM_H_
#define NET_QUIC_TEST_TOOLS_MOCK_QUIC_SPDY_CLIENT_STREAM_H_

#include "base/macros.h"
#include "net/quic/quic_protocol.h"
#include "net/tools/quic/quic_spdy_client_stream.h"
#include "testing/gmock/include/gmock/gmock.h"
// #include "testing/gtest/include/gtest/gtest.h"

namespace net {
namespace test {

class MockQuicSpdyClientStream : public net::QuicSpdyClientStream {
 public:
  MockQuicSpdyClientStream(QuicStreamId id, net::QuicClientSession* session);
  ~MockQuicSpdyClientStream() override;

  MOCK_METHOD1(OnStreamFrame, void(const QuicStreamFrame& frame));
  MOCK_METHOD2(OnInitialHeadersComplete, void(bool fin, size_t frame_len));
  MOCK_METHOD2(OnTrailingHeadersComplete, void(bool fin, size_t frame_len));
  MOCK_METHOD1(OnPromiseHeaders, void(base::StringPiece headers_data));
  MOCK_METHOD2(OnPromiseHeadersComplete,
               void(QuicStreamId promised_stream_id, size_t frame_len));
  MOCK_METHOD0(OnDataAvailable, void());
};

}  // namespace test
}  // namespace net

#endif  // NET_QUIC_TEST_TOOLS_MOCK_QUIC_SPDY_CLIENT_STREAM_H_