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

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

Issue 159573: Nice and easy fix for the media clock interpolating past the duration. (Closed)
Patch Set: Typos Created 11 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
« no previous file with comments | « no previous file | media/base/pipeline_impl.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) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 // Helper gmock function that immediately destroys the FilterCallback on behalf 329 // Helper gmock function that immediately destroys the FilterCallback on behalf
330 // of the provided filter. Can be used when mocking the Initialize() and Seek() 330 // of the provided filter. Can be used when mocking the Initialize() and Seek()
331 // methods. 331 // methods.
332 void DestroyFilterCallback(::testing::Unused, FilterCallback* callback); 332 void DestroyFilterCallback(::testing::Unused, FilterCallback* callback);
333 333
334 // Helper gmock action that calls SetError() on behalf of the provided filter. 334 // Helper gmock action that calls SetError() on behalf of the provided filter.
335 ACTION_P2(SetError, filter, error) { 335 ACTION_P2(SetError, filter, error) {
336 filter->host()->SetError(error); 336 filter->host()->SetError(error);
337 } 337 }
338 338
339 // Helper gmock action that calls SetDuration() on behalf of the provided
340 // filter.
341 ACTION_P2(SetDuration, filter, duration) {
342 filter->host()->SetDuration(duration);
343 }
344
339 } // namespace media 345 } // namespace media
340 346
341 #endif // MEDIA_BASE_MOCK_FILTERS_H_ 347 #endif // MEDIA_BASE_MOCK_FILTERS_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/pipeline_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698