OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_BASE_MOCK_FILTERS_H_ | 5 #ifndef MEDIA_BASE_MOCK_FILTERS_H_ |
6 #define MEDIA_BASE_MOCK_FILTERS_H_ | 6 #define MEDIA_BASE_MOCK_FILTERS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
77 virtual ~MockVideoDecoder(); | 77 virtual ~MockVideoDecoder(); |
78 | 78 |
79 // VideoDecoder implementation. | 79 // VideoDecoder implementation. |
80 MOCK_METHOD4(Initialize, void(const VideoDecoderConfig& config, | 80 MOCK_METHOD4(Initialize, void(const VideoDecoderConfig& config, |
81 bool low_delay, | 81 bool low_delay, |
82 const PipelineStatusCB& status_cb, | 82 const PipelineStatusCB& status_cb, |
83 const OutputCB& output_cb)); | 83 const OutputCB& output_cb)); |
84 MOCK_METHOD2(Decode, void(const scoped_refptr<DecoderBuffer>& buffer, | 84 MOCK_METHOD2(Decode, void(const scoped_refptr<DecoderBuffer>& buffer, |
85 const DecodeCB&)); | 85 const DecodeCB&)); |
86 MOCK_METHOD1(Reset, void(const base::Closure&)); | 86 MOCK_METHOD1(Reset, void(const base::Closure&)); |
87 MOCK_METHOD0(Stop, void()); | |
88 MOCK_CONST_METHOD0(HasAlpha, bool()); | 87 MOCK_CONST_METHOD0(HasAlpha, bool()); |
89 | 88 |
89 // Helper function to verify destructor call. | |
90 MOCK_METHOD0(Destroy, void()); | |
scherkus (not reviewing)
2014/07/15 23:37:26
do we really need this?
for example ... would it
xhwang
2014/07/16 03:37:22
Done.
| |
91 | |
90 private: | 92 private: |
91 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder); | 93 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder); |
92 }; | 94 }; |
93 | 95 |
94 class MockAudioDecoder : public AudioDecoder { | 96 class MockAudioDecoder : public AudioDecoder { |
95 public: | 97 public: |
96 MockAudioDecoder(); | 98 MockAudioDecoder(); |
97 virtual ~MockAudioDecoder(); | 99 virtual ~MockAudioDecoder(); |
98 | 100 |
99 // AudioDecoder implementation. | 101 // AudioDecoder implementation. |
100 MOCK_METHOD3(Initialize, | 102 MOCK_METHOD3(Initialize, |
101 void(const AudioDecoderConfig& config, | 103 void(const AudioDecoderConfig& config, |
102 const PipelineStatusCB& status_cb, | 104 const PipelineStatusCB& status_cb, |
103 const OutputCB& output_cb)); | 105 const OutputCB& output_cb)); |
104 MOCK_METHOD2(Decode, | 106 MOCK_METHOD2(Decode, |
105 void(const scoped_refptr<DecoderBuffer>& buffer, | 107 void(const scoped_refptr<DecoderBuffer>& buffer, |
106 const DecodeCB&)); | 108 const DecodeCB&)); |
107 MOCK_METHOD1(Reset, void(const base::Closure&)); | 109 MOCK_METHOD1(Reset, void(const base::Closure&)); |
108 MOCK_METHOD0(Stop, void()); | 110 |
111 // Helper function to verify destructor call. | |
112 MOCK_METHOD0(Destroy, void()); | |
109 | 113 |
110 private: | 114 private: |
111 DISALLOW_COPY_AND_ASSIGN(MockAudioDecoder); | 115 DISALLOW_COPY_AND_ASSIGN(MockAudioDecoder); |
112 }; | 116 }; |
113 | 117 |
114 class MockVideoRenderer : public VideoRenderer { | 118 class MockVideoRenderer : public VideoRenderer { |
115 public: | 119 public: |
116 MockVideoRenderer(); | 120 MockVideoRenderer(); |
117 virtual ~MockVideoRenderer(); | 121 virtual ~MockVideoRenderer(); |
118 | 122 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
212 public: | 216 public: |
213 MockStatisticsCB(); | 217 MockStatisticsCB(); |
214 ~MockStatisticsCB(); | 218 ~MockStatisticsCB(); |
215 | 219 |
216 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); | 220 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); |
217 }; | 221 }; |
218 | 222 |
219 } // namespace media | 223 } // namespace media |
220 | 224 |
221 #endif // MEDIA_BASE_MOCK_FILTERS_H_ | 225 #endif // MEDIA_BASE_MOCK_FILTERS_H_ |
OLD | NEW |