blob: 9ed4b7ec924c3e7d129df080acb8a19d56df2a08 [file] [log] [blame]
[email protected]0a071a32011-02-08 00:18:241// Copyright (c) 2011 The Chromium Authors. All rights reserved.
[email protected]cb3b1f9312010-06-07 19:58:232// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]f6da0b252011-03-31 00:26:035#ifndef JINGLE_GLUE_JINGLE_GLUE_MOCK_OBJECTS_H_
6#define JINGLE_GLUE_JINGLE_GLUE_MOCK_OBJECTS_H_
[email protected]cb3b1f9312010-06-07 19:58:237
avia2a6db22015-12-22 02:05:168#include <stddef.h>
9
[email protected]cb3b1f9312010-06-07 19:58:2310#include "testing/gmock/include/gmock/gmock.h"
Henrik Kjellander5f4278232017-06-30 09:24:4711#include "third_party/webrtc/rtc_base/stream.h"
[email protected]cb3b1f9312010-06-07 19:58:2312
[email protected]f6da0b252011-03-31 00:26:0313namespace jingle_glue {
[email protected]cb3b1f9312010-06-07 19:58:2314
[email protected]e758d4c2014-08-06 16:48:1615class MockStream : public rtc::StreamInterface {
[email protected]10c94b3a2010-10-01 20:54:3216 public:
[email protected]0a071a32011-02-08 00:18:2417 MockStream();
Daniel Cheng2471067332018-04-27 03:00:4318 ~MockStream() override;
[email protected]10c94b3a2010-10-01 20:54:3219
[email protected]e758d4c2014-08-06 16:48:1620 MOCK_CONST_METHOD0(GetState, rtc::StreamState());
[email protected]10c94b3a2010-10-01 20:54:3221
[email protected]e758d4c2014-08-06 16:48:1622 MOCK_METHOD4(Read, rtc::StreamResult(void*, size_t, size_t*, int*));
23 MOCK_METHOD4(Write, rtc::StreamResult(const void*, size_t,
[email protected]10c94b3a2010-10-01 20:54:3224 size_t*, int*));
25 MOCK_CONST_METHOD1(GetAvailable, bool(size_t*));
26 MOCK_METHOD0(Close, void());
27
[email protected]e758d4c2014-08-06 16:48:1628 MOCK_METHOD3(PostEvent, void(rtc::Thread*, int, int));
[email protected]10c94b3a2010-10-01 20:54:3229 MOCK_METHOD2(PostEvent, void(int, int));
30};
31
[email protected]f6da0b252011-03-31 00:26:0332} // namespace jingle_glue
[email protected]cb3b1f9312010-06-07 19:58:2333
[email protected]f6da0b252011-03-31 00:26:0334#endif // JINGLE_GLUE_JINGLE_GLUE_MOCK_OBJECTS_H_