Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: media/base/mock_filters.h

Issue 10918022: Move AudioDecoder initialization into AudioRenderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 private: 161 private:
162 DISALLOW_COPY_AND_ASSIGN(MockVideoRenderer); 162 DISALLOW_COPY_AND_ASSIGN(MockVideoRenderer);
163 }; 163 };
164 164
165 class MockAudioRenderer : public AudioRenderer { 165 class MockAudioRenderer : public AudioRenderer {
166 public: 166 public:
167 MockAudioRenderer(); 167 MockAudioRenderer();
168 168
169 // AudioRenderer implementation. 169 // AudioRenderer implementation.
170 MOCK_METHOD7(Initialize, void(const scoped_refptr<AudioDecoder>& decoder, 170 MOCK_METHOD9(Initialize, void(const scoped_refptr<DemuxerStream>& stream,
171 const AudioDecoderList& decoders,
171 const PipelineStatusCB& init_cb, 172 const PipelineStatusCB& init_cb,
173 const StatisticsCB& statistics_cb,
172 const base::Closure& underflow_cb, 174 const base::Closure& underflow_cb,
173 const TimeCB& time_cb, 175 const TimeCB& time_cb,
174 const base::Closure& ended_cb, 176 const base::Closure& ended_cb,
175 const base::Closure& disabled_cb, 177 const base::Closure& disabled_cb,
176 const PipelineStatusCB& error_cb)); 178 const PipelineStatusCB& error_cb));
177 MOCK_METHOD1(Play, void(const base::Closure& callback)); 179 MOCK_METHOD1(Play, void(const base::Closure& callback));
178 MOCK_METHOD1(Pause, void(const base::Closure& callback)); 180 MOCK_METHOD1(Pause, void(const base::Closure& callback));
179 MOCK_METHOD1(Flush, void(const base::Closure& callback)); 181 MOCK_METHOD1(Flush, void(const base::Closure& callback));
180 MOCK_METHOD1(Stop, void(const base::Closure& callback)); 182 MOCK_METHOD1(Stop, void(const base::Closure& callback));
181 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate)); 183 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate));
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 public: 287 public:
286 MockStatisticsCB(); 288 MockStatisticsCB();
287 ~MockStatisticsCB(); 289 ~MockStatisticsCB();
288 290
289 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); 291 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics));
290 }; 292 };
291 293
292 } // namespace media 294 } // namespace media
293 295
294 #endif // MEDIA_BASE_MOCK_FILTERS_H_ 296 #endif // MEDIA_BASE_MOCK_FILTERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698