| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // A new breed of mock media filters, this time using gmock! Feel free to add | 5 // A new breed of mock media filters, this time using gmock! Feel free to add |
| 6 // actions if you need interesting side-effects (i.e., copying data to the | 6 // actions if you need interesting side-effects (i.e., copying data to the |
| 7 // buffer passed into MockDataSource::Read()). | 7 // buffer passed into MockDataSource::Read()). |
| 8 // | 8 // |
| 9 // Don't forget you can use StrictMock<> and NiceMock<> if you want the mock | 9 // Don't forget you can use StrictMock<> and NiceMock<> if you want the mock |
| 10 // filters to fail the test or do nothing when an unexpected method is called. | 10 // filters to fail the test or do nothing when an unexpected method is called. |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 }; | 152 }; |
| 153 | 153 |
| 154 class MockDemuxerStream : public DemuxerStream { | 154 class MockDemuxerStream : public DemuxerStream { |
| 155 public: | 155 public: |
| 156 MockDemuxerStream(); | 156 MockDemuxerStream(); |
| 157 | 157 |
| 158 // DemuxerStream implementation. | 158 // DemuxerStream implementation. |
| 159 MOCK_METHOD0(type, Type()); | 159 MOCK_METHOD0(type, Type()); |
| 160 MOCK_METHOD1(Read, void(const ReadCallback& read_callback)); | 160 MOCK_METHOD1(Read, void(const ReadCallback& read_callback)); |
| 161 MOCK_METHOD0(GetAVStream, AVStream*()); | 161 MOCK_METHOD0(GetAVStream, AVStream*()); |
| 162 MOCK_METHOD0(audio_decoder_config, AudioDecoderConfig*()); |
| 162 MOCK_METHOD0(EnableBitstreamConverter, void()); | 163 MOCK_METHOD0(EnableBitstreamConverter, void()); |
| 163 | 164 |
| 164 protected: | 165 protected: |
| 165 virtual ~MockDemuxerStream(); | 166 virtual ~MockDemuxerStream(); |
| 166 | 167 |
| 167 private: | 168 private: |
| 168 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream); | 169 DISALLOW_COPY_AND_ASSIGN(MockDemuxerStream); |
| 169 }; | 170 }; |
| 170 | 171 |
| 171 class MockVideoDecoder : public VideoDecoder { | 172 class MockVideoDecoder : public VideoDecoder { |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 public: | 352 public: |
| 352 MockStatisticsCallback(); | 353 MockStatisticsCallback(); |
| 353 ~MockStatisticsCallback(); | 354 ~MockStatisticsCallback(); |
| 354 | 355 |
| 355 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); | 356 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); |
| 356 }; | 357 }; |
| 357 | 358 |
| 358 } // namespace media | 359 } // namespace media |
| 359 | 360 |
| 360 #endif // MEDIA_BASE_MOCK_FILTERS_H_ | 361 #endif // MEDIA_BASE_MOCK_FILTERS_H_ |
| OLD | NEW |