| 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 // 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 public: | 226 public: |
| 227 MockVideoRenderer(); | 227 MockVideoRenderer(); |
| 228 | 228 |
| 229 // Filter implementation. | 229 // Filter implementation. |
| 230 MOCK_METHOD1(Stop, void(const base::Closure& callback)); | 230 MOCK_METHOD1(Stop, void(const base::Closure& callback)); |
| 231 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate)); | 231 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate)); |
| 232 MOCK_METHOD2(Seek, void(base::TimeDelta time, const PipelineStatusCB& cb)); | 232 MOCK_METHOD2(Seek, void(base::TimeDelta time, const PipelineStatusCB& cb)); |
| 233 MOCK_METHOD0(OnAudioRendererDisabled, void()); | 233 MOCK_METHOD0(OnAudioRendererDisabled, void()); |
| 234 | 234 |
| 235 // VideoRenderer implementation. | 235 // VideoRenderer implementation. |
| 236 MOCK_METHOD4(Initialize, void(VideoDecoder* decoder, | 236 MOCK_METHOD4(Initialize, void(const scoped_refptr<VideoDecoder>& decoder, |
| 237 const PipelineStatusCB& status_cb, | 237 const PipelineStatusCB& status_cb, |
| 238 const StatisticsCB& statistics_cb, | 238 const StatisticsCB& statistics_cb, |
| 239 const TimeCB& time_cb)); | 239 const TimeCB& time_cb)); |
| 240 | 240 |
| 241 MOCK_METHOD0(HasEnded, bool()); | 241 MOCK_METHOD0(HasEnded, bool()); |
| 242 | 242 |
| 243 // TODO(scherkus): although VideoRendererBase defines this method, this really | 243 // TODO(scherkus): although VideoRendererBase defines this method, this really |
| 244 // shouldn't be here OR should be renamed. | 244 // shouldn't be here OR should be renamed. |
| 245 MOCK_METHOD1(ConsumeVideoFrame, void(scoped_refptr<VideoFrame> frame)); | 245 MOCK_METHOD1(ConsumeVideoFrame, void(scoped_refptr<VideoFrame> frame)); |
| 246 | 246 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 public: | 345 public: |
| 346 MockStatisticsCB(); | 346 MockStatisticsCB(); |
| 347 ~MockStatisticsCB(); | 347 ~MockStatisticsCB(); |
| 348 | 348 |
| 349 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); | 349 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); |
| 350 }; | 350 }; |
| 351 | 351 |
| 352 } // namespace media | 352 } // namespace media |
| 353 | 353 |
| 354 #endif // MEDIA_BASE_MOCK_FILTERS_H_ | 354 #endif // MEDIA_BASE_MOCK_FILTERS_H_ |
| OLD | NEW |