[email protected] | 0a071a3 | 2011-02-08 00:18:24 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
[email protected] | cb3b1f931 | 2010-06-07 19:58:23 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | f6da0b25 | 2011-03-31 00:26:03 | [diff] [blame] | 5 | #ifndef JINGLE_GLUE_JINGLE_GLUE_MOCK_OBJECTS_H_ |
| 6 | #define JINGLE_GLUE_JINGLE_GLUE_MOCK_OBJECTS_H_ |
[email protected] | cb3b1f931 | 2010-06-07 19:58:23 | [diff] [blame] | 7 | |
avi | a2a6db2 | 2015-12-22 02:05:16 | [diff] [blame] | 8 | #include <stddef.h> |
| 9 | |
[email protected] | cb3b1f931 | 2010-06-07 19:58:23 | [diff] [blame] | 10 | #include "testing/gmock/include/gmock/gmock.h" |
Henrik Kjellander | 5f427823 | 2017-06-30 09:24:47 | [diff] [blame] | 11 | #include "third_party/webrtc/rtc_base/stream.h" |
[email protected] | cb3b1f931 | 2010-06-07 19:58:23 | [diff] [blame] | 12 | |
[email protected] | f6da0b25 | 2011-03-31 00:26:03 | [diff] [blame] | 13 | namespace jingle_glue { |
[email protected] | cb3b1f931 | 2010-06-07 19:58:23 | [diff] [blame] | 14 | |
[email protected] | e758d4c | 2014-08-06 16:48:16 | [diff] [blame] | 15 | class MockStream : public rtc::StreamInterface { |
[email protected] | 10c94b3a | 2010-10-01 20:54:32 | [diff] [blame] | 16 | public: |
[email protected] | 0a071a3 | 2011-02-08 00:18:24 | [diff] [blame] | 17 | MockStream(); |
Daniel Cheng | 247106733 | 2018-04-27 03:00:43 | [diff] [blame] | 18 | ~MockStream() override; |
[email protected] | 10c94b3a | 2010-10-01 20:54:32 | [diff] [blame] | 19 | |
[email protected] | e758d4c | 2014-08-06 16:48:16 | [diff] [blame] | 20 | MOCK_CONST_METHOD0(GetState, rtc::StreamState()); |
[email protected] | 10c94b3a | 2010-10-01 20:54:32 | [diff] [blame] | 21 | |
[email protected] | e758d4c | 2014-08-06 16:48:16 | [diff] [blame] | 22 | MOCK_METHOD4(Read, rtc::StreamResult(void*, size_t, size_t*, int*)); |
| 23 | MOCK_METHOD4(Write, rtc::StreamResult(const void*, size_t, |
[email protected] | 10c94b3a | 2010-10-01 20:54:32 | [diff] [blame] | 24 | size_t*, int*)); |
| 25 | MOCK_CONST_METHOD1(GetAvailable, bool(size_t*)); |
| 26 | MOCK_METHOD0(Close, void()); |
| 27 | |
[email protected] | e758d4c | 2014-08-06 16:48:16 | [diff] [blame] | 28 | MOCK_METHOD3(PostEvent, void(rtc::Thread*, int, int)); |
[email protected] | 10c94b3a | 2010-10-01 20:54:32 | [diff] [blame] | 29 | MOCK_METHOD2(PostEvent, void(int, int)); |
| 30 | }; |
| 31 | |
[email protected] | f6da0b25 | 2011-03-31 00:26:03 | [diff] [blame] | 32 | } // namespace jingle_glue |
[email protected] | cb3b1f931 | 2010-06-07 19:58:23 | [diff] [blame] | 33 | |
[email protected] | f6da0b25 | 2011-03-31 00:26:03 | [diff] [blame] | 34 | #endif // JINGLE_GLUE_JINGLE_GLUE_MOCK_OBJECTS_H_ |