| Index: media/base/mock_filters.h
|
| diff --git a/media/base/mock_filters.h b/media/base/mock_filters.h
|
| index f60c9cdf8f46419231e2e9faa629f514eb42b566..cd7cc67451cc97c25229c8f8b9d3c75cb25d7cde 100644
|
| --- a/media/base/mock_filters.h
|
| +++ b/media/base/mock_filters.h
|
| @@ -19,6 +19,7 @@
|
| #include "media/base/decryptor.h"
|
| #include "media/base/demuxer.h"
|
| #include "media/base/pipeline.h"
|
| +#include "media/base/pipeline_client.h"
|
| #include "media/base/pipeline_status.h"
|
| #include "media/base/renderer.h"
|
| #include "media/base/text_track.h"
|
| @@ -31,26 +32,32 @@
|
|
|
| namespace media {
|
|
|
| +class MockPipelineClient : public PipelineClient {
|
| + public:
|
| + MockPipelineClient();
|
| + ~MockPipelineClient() override;
|
| +
|
| + MOCK_METHOD1(OnError, void(PipelineStatus));
|
| + MOCK_METHOD0(OnEnded, void());
|
| + MOCK_METHOD1(OnMetadata, void(PipelineMetadata));
|
| + MOCK_METHOD1(OnBufferingStateChange, void(BufferingState));
|
| + MOCK_METHOD0(OnDurationChange, void());
|
| + MOCK_METHOD2(OnAddTextTrack,
|
| + void(const TextTrackConfig&, const AddTextTrackDoneCB&));
|
| + MOCK_METHOD0(OnWaitingForDecryptionKey, void());
|
| +};
|
| +
|
| class MockPipeline : public Pipeline {
|
| public:
|
| - MockPipeline();
|
| + MockPipeline(PipelineClient* client);
|
| virtual ~MockPipeline();
|
|
|
| // Note: Start() and Resume() declarations are not actually overrides; they
|
| // take scoped_ptr* instead of scoped_ptr so that they can be mock methods.
|
| // Private stubs for Start() and Resume() implement the actual Pipeline
|
| // interface by forwarding to these mock methods.
|
| - MOCK_METHOD10(Start,
|
| - void(Demuxer*,
|
| - scoped_ptr<Renderer>*,
|
| - const base::Closure&,
|
| - const PipelineStatusCB&,
|
| - const PipelineStatusCB&,
|
| - const PipelineMetadataCB&,
|
| - const BufferingStateCB&,
|
| - const base::Closure&,
|
| - const AddTextTrackCB&,
|
| - const base::Closure&));
|
| + MOCK_METHOD3(Start,
|
| + void(Demuxer*, scoped_ptr<Renderer>*, const PipelineStatusCB&));
|
| MOCK_METHOD1(Stop, void(const base::Closure&));
|
| MOCK_METHOD2(Seek, void(base::TimeDelta, const PipelineStatusCB&));
|
| MOCK_METHOD1(Suspend, void(const PipelineStatusCB&));
|
| @@ -82,14 +89,7 @@ class MockPipeline : public Pipeline {
|
| // Forwarding stubs (see comment above).
|
| void Start(Demuxer* demuxer,
|
| scoped_ptr<Renderer> renderer,
|
| - const base::Closure& ended_cb,
|
| - const PipelineStatusCB& error_cb,
|
| - const PipelineStatusCB& seek_cb,
|
| - const PipelineMetadataCB& metadata_cb,
|
| - const BufferingStateCB& buffering_state_cb,
|
| - const base::Closure& duration_change_cb,
|
| - const AddTextTrackCB& add_text_track_cb,
|
| - const base::Closure& waiting_for_decryption_key_cb) override;
|
| + const PipelineStatusCB& seek_cb) override;
|
| void Resume(scoped_ptr<Renderer> renderer,
|
| base::TimeDelta timestamp,
|
| const PipelineStatusCB& seek_cb) override;
|
|
|