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

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

Issue 9854031: Replace size_t with int in a few media classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 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 | « media/base/data_source.cc ('k') | media/base/seekable_buffer.h » ('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) 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 (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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 MockDataSource(); 74 MockDataSource();
75 75
76 virtual void set_host(DataSourceHost* data_source_host); 76 virtual void set_host(DataSourceHost* data_source_host);
77 77
78 MOCK_METHOD1(Stop, void(const base::Closure& callback)); 78 MOCK_METHOD1(Stop, void(const base::Closure& callback));
79 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate)); 79 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate));
80 MOCK_METHOD2(Seek, void(base::TimeDelta time, const PipelineStatusCB& cb)); 80 MOCK_METHOD2(Seek, void(base::TimeDelta time, const PipelineStatusCB& cb));
81 MOCK_METHOD0(OnAudioRendererDisabled, void()); 81 MOCK_METHOD0(OnAudioRendererDisabled, void());
82 82
83 // DataSource implementation. 83 // DataSource implementation.
84 MOCK_METHOD4(Read, void(int64 position, size_t size, uint8* data, 84 MOCK_METHOD4(Read, void(int64 position, int size, uint8* data,
85 const DataSource::ReadCB& callback)); 85 const DataSource::ReadCB& callback));
86 MOCK_METHOD1(GetSize, bool(int64* size_out)); 86 MOCK_METHOD1(GetSize, bool(int64* size_out));
87 MOCK_METHOD1(SetPreload, void(Preload preload)); 87 MOCK_METHOD1(SetPreload, void(Preload preload));
88 MOCK_METHOD1(SetBitrate, void(int bitrate)); 88 MOCK_METHOD1(SetBitrate, void(int bitrate));
89 MOCK_METHOD0(IsStreaming, bool()); 89 MOCK_METHOD0(IsStreaming, bool());
90 90
91 // Sets the TotalBytes & BufferedBytes values to be sent to host() when 91 // Sets the TotalBytes & BufferedBytes values to be sent to host() when
92 // the set_host() is called. 92 // the set_host() is called.
93 void SetTotalAndBufferedBytes(int64 total_bytes, int64 buffered_bytes); 93 void SetTotalAndBufferedBytes(int64 total_bytes, int64 buffered_bytes);
94 94
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 public: 345 public:
346 MockStatisticsCB(); 346 MockStatisticsCB();
347 ~MockStatisticsCB(); 347 ~MockStatisticsCB();
348 348
349 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); 349 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics));
350 }; 350 };
351 351
352 } // namespace media 352 } // namespace media
353 353
354 #endif // MEDIA_BASE_MOCK_FILTERS_H_ 354 #endif // MEDIA_BASE_MOCK_FILTERS_H_
OLDNEW
« no previous file with comments | « media/base/data_source.cc ('k') | media/base/seekable_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698