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

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

Issue 7484054: Migrate Pipeline & PipelineImpl to PipelineStatusCB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CR nits Created 9 years, 4 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
« no previous file with comments | « no previous file | media/base/mock_filters.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 scoped_refptr<MockAudioRenderer> audio_renderer_; 305 scoped_refptr<MockAudioRenderer> audio_renderer_;
306 306
307 DISALLOW_COPY_AND_ASSIGN(MockFilterCollection); 307 DISALLOW_COPY_AND_ASSIGN(MockFilterCollection);
308 }; 308 };
309 309
310 // Helper gmock functions that immediately executes and destroys the 310 // Helper gmock functions that immediately executes and destroys the
311 // FilterCallback on behalf of the provided filter. Can be used when mocking 311 // FilterCallback on behalf of the provided filter. Can be used when mocking
312 // the Initialize() and Seek() methods. 312 // the Initialize() and Seek() methods.
313 void RunFilterCallback(::testing::Unused, FilterCallback* callback); 313 void RunFilterCallback(::testing::Unused, FilterCallback* callback);
314 void RunFilterStatusCB(::testing::Unused, const FilterStatusCB& cb); 314 void RunFilterStatusCB(::testing::Unused, const FilterStatusCB& cb);
315 void RunPipelineStatusCallback(PipelineStatus status, 315 void RunPipelineStatusCB(PipelineStatus status, const PipelineStatusCB& cb);
316 PipelineStatusCallback* callback);
317 void RunFilterCallback3(::testing::Unused, FilterCallback* callback, 316 void RunFilterCallback3(::testing::Unused, FilterCallback* callback,
318 ::testing::Unused); 317 ::testing::Unused);
319 318
320 // Helper gmock function that immediately destroys the FilterCallback on behalf 319 // Helper gmock function that immediately destroys the FilterCallback on behalf
321 // of the provided filter. Can be used when mocking the Initialize() and Seek() 320 // of the provided filter. Can be used when mocking the Initialize() and Seek()
322 // methods. 321 // methods.
323 void DestroyFilterCallback(::testing::Unused, FilterCallback* callback); 322 void DestroyFilterCallback(::testing::Unused, FilterCallback* callback);
324 323
325 // Helper gmock function that immediately executes and destroys the 324 // Helper gmock function that immediately executes and destroys the
326 // FilterCallback on behalf of the provided filter. Can be used when mocking 325 // FilterCallback on behalf of the provided filter. Can be used when mocking
(...skipping 22 matching lines...) Expand all
349 public: 348 public:
350 MockStatisticsCallback(); 349 MockStatisticsCallback();
351 ~MockStatisticsCallback(); 350 ~MockStatisticsCallback();
352 351
353 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); 352 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics));
354 }; 353 };
355 354
356 } // namespace media 355 } // namespace media
357 356
358 #endif // MEDIA_BASE_MOCK_FILTERS_H_ 357 #endif // MEDIA_BASE_MOCK_FILTERS_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/mock_filters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698