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

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

Issue 8661002: Fire CanPlayThrough immediately for local and streaming media files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase ToT Created 9 years 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) 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 public: 106 public:
107 MockDemuxer(); 107 MockDemuxer();
108 // Filter implementation. 108 // Filter implementation.
109 virtual void set_host(FilterHost* host); 109 virtual void set_host(FilterHost* host);
110 MOCK_METHOD1(Stop, void(const base::Closure& callback)); 110 MOCK_METHOD1(Stop, void(const base::Closure& callback));
111 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate)); 111 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate));
112 MOCK_METHOD1(SetPreload, void(Preload preload)); 112 MOCK_METHOD1(SetPreload, void(Preload preload));
113 MOCK_METHOD2(Seek, void(base::TimeDelta time, const FilterStatusCB& cb)); 113 MOCK_METHOD2(Seek, void(base::TimeDelta time, const FilterStatusCB& cb));
114 MOCK_METHOD0(OnAudioRendererDisabled, void()); 114 MOCK_METHOD0(OnAudioRendererDisabled, void());
115 MOCK_METHOD0(GetBitrate, int()); 115 MOCK_METHOD0(GetBitrate, int());
116 MOCK_METHOD0(IsLocalSource, bool());
117 MOCK_METHOD0(IsSeekable, bool());
116 118
117 // Demuxer implementation. 119 // Demuxer implementation.
118 MOCK_METHOD2(Initialize, void(DataSource* data_source, 120 MOCK_METHOD2(Initialize, void(DataSource* data_source,
119 const base::Closure& callback)); 121 const base::Closure& callback));
120 MOCK_METHOD1(GetStream, scoped_refptr<DemuxerStream>(DemuxerStream::Type)); 122 MOCK_METHOD1(GetStream, scoped_refptr<DemuxerStream>(DemuxerStream::Type));
121 MOCK_CONST_METHOD0(GetStartTime, base::TimeDelta()); 123 MOCK_CONST_METHOD0(GetStartTime, base::TimeDelta());
122 124
123 // Sets the TotalBytes, BufferedBytes, & Duration values to be sent to host() 125 // Sets the TotalBytes, BufferedBytes, & Duration values to be sent to host()
124 // when set_host() is called. 126 // when set_host() is called.
125 void SetTotalAndBufferedBytesAndDuration( 127 void SetTotalAndBufferedBytesAndDuration(
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 public: 351 public:
350 MockStatisticsCallback(); 352 MockStatisticsCallback();
351 ~MockStatisticsCallback(); 353 ~MockStatisticsCallback();
352 354
353 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); 355 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics));
354 }; 356 };
355 357
356 } // namespace media 358 } // namespace media
357 359
358 #endif // MEDIA_BASE_MOCK_FILTERS_H_ 360 #endif // MEDIA_BASE_MOCK_FILTERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698