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

Unified Diff: media/filters/pipeline_controller_unittest.cc

Issue 1904793002: Move Pipeline permanent callbacks into Pipeline::Client interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: post stop callback Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/pipeline_controller.cc ('k') | media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/pipeline_controller_unittest.cc
diff --git a/media/filters/pipeline_controller_unittest.cc b/media/filters/pipeline_controller_unittest.cc
index c67d3c0ed24ec7be11f59b3e16ceeac3cb504116..e8fa5a332dbc4f53f8d6297335edcfbd89a407b7 100644
--- a/media/filters/pipeline_controller_unittest.cc
+++ b/media/filters/pipeline_controller_unittest.cc
@@ -28,7 +28,7 @@ using ::testing::StrictMock;
namespace media {
-class PipelineControllerTest : public ::testing::Test {
+class PipelineControllerTest : public ::testing::Test, public Pipeline::Client {
public:
PipelineControllerTest()
: pipeline_controller_(&pipeline_,
@@ -46,12 +46,8 @@ class PipelineControllerTest : public ::testing::Test {
PipelineStatusCB StartPipeline(bool is_streaming, bool is_static) {
EXPECT_FALSE(pipeline_controller_.IsStable());
PipelineStatusCB start_cb;
- EXPECT_CALL(pipeline_, Start(_, _, _, _, _, _, _, _, _, _))
- .WillOnce(SaveArg<4>(&start_cb));
- pipeline_controller_.Start(&demuxer_, is_streaming, is_static,
- base::Closure(), PipelineMetadataCB(),
- BufferingStateCB(), base::Closure(),
- AddTextTrackCB(), base::Closure());
+ EXPECT_CALL(pipeline_, Start(_, _, _, _)).WillOnce(SaveArg<3>(&start_cb));
+ pipeline_controller_.Start(&demuxer_, this, is_streaming, is_static);
Mock::VerifyAndClear(&pipeline_);
EXPECT_FALSE(pipeline_controller_.IsStable());
return start_cb;
@@ -120,7 +116,15 @@ class PipelineControllerTest : public ::testing::Test {
void OnSuspended() { was_suspended_ = true; }
- void OnError(PipelineStatus status) { NOTREACHED(); }
+ // Pipeline::Client overrides
+ void OnError(PipelineStatus status) override { NOTREACHED(); }
+ void OnEnded() override{};
+ void OnMetadata(PipelineMetadata metadata) override{};
+ void OnBufferingStateChange(BufferingState state) override{};
+ void OnDurationChange() override{};
+ void OnAddTextTrack(const TextTrackConfig& config,
+ const AddTextTrackDoneCB& done_cb) override{};
+ void OnWaitingForDecryptionKey() override{};
base::MessageLoop message_loop_;
« no previous file with comments | « media/filters/pipeline_controller.cc ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698