| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 MockVideoDecoder(); | 181 MockVideoDecoder(); |
| 182 | 182 |
| 183 // Filter implementation. | 183 // Filter implementation. |
| 184 MOCK_METHOD1(Stop, void(const base::Closure& callback)); | 184 MOCK_METHOD1(Stop, void(const base::Closure& callback)); |
| 185 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate)); | 185 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate)); |
| 186 MOCK_METHOD2(Seek, void(base::TimeDelta time, const FilterStatusCB& cb)); | 186 MOCK_METHOD2(Seek, void(base::TimeDelta time, const FilterStatusCB& cb)); |
| 187 MOCK_METHOD0(OnAudioRendererDisabled, void()); | 187 MOCK_METHOD0(OnAudioRendererDisabled, void()); |
| 188 | 188 |
| 189 // VideoDecoder implementation. | 189 // VideoDecoder implementation. |
| 190 MOCK_METHOD3(Initialize, void(DemuxerStream* stream, | 190 MOCK_METHOD3(Initialize, void(DemuxerStream* stream, |
| 191 const base::Closure& callback, | 191 const PipelineStatusCB& callback, |
| 192 const StatisticsCallback& stats_callback)); | 192 const StatisticsCallback& stats_callback)); |
| 193 MOCK_METHOD1(Read, void(const ReadCB& callback)); | 193 MOCK_METHOD1(Read, void(const ReadCB& callback)); |
| 194 MOCK_METHOD0(natural_size, const gfx::Size&()); | 194 MOCK_METHOD0(natural_size, const gfx::Size&()); |
| 195 | 195 |
| 196 protected: | 196 protected: |
| 197 virtual ~MockVideoDecoder(); | 197 virtual ~MockVideoDecoder(); |
| 198 | 198 |
| 199 private: | 199 private: |
| 200 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder); | 200 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder); |
| 201 }; | 201 }; |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 public: | 351 public: |
| 352 MockStatisticsCallback(); | 352 MockStatisticsCallback(); |
| 353 ~MockStatisticsCallback(); | 353 ~MockStatisticsCallback(); |
| 354 | 354 |
| 355 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); | 355 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); |
| 356 }; | 356 }; |
| 357 | 357 |
| 358 } // namespace media | 358 } // namespace media |
| 359 | 359 |
| 360 #endif // MEDIA_BASE_MOCK_FILTERS_H_ | 360 #endif // MEDIA_BASE_MOCK_FILTERS_H_ |
| OLD | NEW |