| 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. | 6 // actions if you need interesting side-effects. |
| 7 // | 7 // |
| 8 // Don't forget you can use StrictMock<> and NiceMock<> if you want the mock | 8 // Don't forget you can use StrictMock<> and NiceMock<> if you want the mock |
| 9 // filters to fail the test or do nothing when an unexpected method is called. | 9 // filters to fail the test or do nothing when an unexpected method is called. |
| 10 // http://code.google.com/p/googlemock/wiki/CookBook#Nice_Mocks_and_Strict_Mocks | 10 // http://code.google.com/p/googlemock/wiki/CookBook#Nice_Mocks_and_Strict_Mocks |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 const base::Closure& ended_cb, | 146 const base::Closure& ended_cb, |
| 147 const PipelineStatusCB& error_cb, | 147 const PipelineStatusCB& error_cb, |
| 148 const TimeDeltaCB& get_time_cb, | 148 const TimeDeltaCB& get_time_cb, |
| 149 const TimeDeltaCB& get_duration_cb)); | 149 const TimeDeltaCB& get_duration_cb)); |
| 150 MOCK_METHOD1(Play, void(const base::Closure& callback)); | 150 MOCK_METHOD1(Play, void(const base::Closure& callback)); |
| 151 MOCK_METHOD1(Pause, void(const base::Closure& callback)); | 151 MOCK_METHOD1(Pause, void(const base::Closure& callback)); |
| 152 MOCK_METHOD1(Flush, void(const base::Closure& callback)); | 152 MOCK_METHOD1(Flush, void(const base::Closure& callback)); |
| 153 MOCK_METHOD2(Preroll, void(base::TimeDelta time, const PipelineStatusCB& cb)); | 153 MOCK_METHOD2(Preroll, void(base::TimeDelta time, const PipelineStatusCB& cb)); |
| 154 MOCK_METHOD1(Stop, void(const base::Closure& callback)); | 154 MOCK_METHOD1(Stop, void(const base::Closure& callback)); |
| 155 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate)); | 155 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate)); |
| 156 virtual void PrepareForShutdownHack() {} | |
| 157 | 156 |
| 158 protected: | 157 protected: |
| 159 virtual ~MockVideoRenderer(); | 158 virtual ~MockVideoRenderer(); |
| 160 | 159 |
| 161 private: | 160 private: |
| 162 DISALLOW_COPY_AND_ASSIGN(MockVideoRenderer); | 161 DISALLOW_COPY_AND_ASSIGN(MockVideoRenderer); |
| 163 }; | 162 }; |
| 164 | 163 |
| 165 class MockAudioRenderer : public AudioRenderer { | 164 class MockAudioRenderer : public AudioRenderer { |
| 166 public: | 165 public: |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 public: | 284 public: |
| 286 MockStatisticsCB(); | 285 MockStatisticsCB(); |
| 287 ~MockStatisticsCB(); | 286 ~MockStatisticsCB(); |
| 288 | 287 |
| 289 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); | 288 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); |
| 290 }; | 289 }; |
| 291 | 290 |
| 292 } // namespace media | 291 } // namespace media |
| 293 | 292 |
| 294 #endif // MEDIA_BASE_MOCK_FILTERS_H_ | 293 #endif // MEDIA_BASE_MOCK_FILTERS_H_ |
| OLD | NEW |