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

Unified Diff: media/test/pipeline_integration_test.cc

Issue 1904793002: Move Pipeline permanent callbacks into Pipeline::Client interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: restored lock during stop Created 4 years, 8 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
Index: media/test/pipeline_integration_test.cc
diff --git a/media/test/pipeline_integration_test.cc b/media/test/pipeline_integration_test.cc
index f6a8877307fc3f0f58228110e506e1bcfa12e1f0..dc2c3cde24c9bc8534cb1f09647c7009711f270d 100644
--- a/media/test/pipeline_integration_test.cc
+++ b/media/test/pipeline_integration_test.cc
@@ -706,29 +706,18 @@ class PipelineIntegrationTest : public PipelineIntegrationTestHost {
EXPECT_CALL(*this, OnMetadata(_))
.Times(AtMost(1))
.WillRepeatedly(SaveArg<0>(&metadata_));
- EXPECT_CALL(*this, OnBufferingStateChanged(BUFFERING_HAVE_ENOUGH))
+ EXPECT_CALL(*this, OnBufferingStateChange(BUFFERING_HAVE_ENOUGH))
.Times(AnyNumber());
- EXPECT_CALL(*this, OnBufferingStateChanged(BUFFERING_HAVE_NOTHING))
+ EXPECT_CALL(*this, OnBufferingStateChange(BUFFERING_HAVE_NOTHING))
.Times(AnyNumber());
// Encrypted content not used, so this is never called.
EXPECT_CALL(*this, OnWaitingForDecryptionKey()).Times(0);
demuxer_ = source->GetDemuxer();
- pipeline_->Start(
- demuxer_.get(), CreateRenderer(),
- base::Bind(&PipelineIntegrationTest::OnEnded, base::Unretained(this)),
- base::Bind(&PipelineIntegrationTest::OnError, base::Unretained(this)),
- base::Bind(&PipelineIntegrationTest::OnStatusCallback,
- base::Unretained(this)),
- base::Bind(&PipelineIntegrationTest::OnMetadata,
- base::Unretained(this)),
- base::Bind(&PipelineIntegrationTest::OnBufferingStateChanged,
- base::Unretained(this)),
- base::Closure(), base::Bind(&PipelineIntegrationTest::OnAddTextTrack,
- base::Unretained(this)),
- base::Bind(&PipelineIntegrationTest::OnWaitingForDecryptionKey,
- base::Unretained(this)));
+ pipeline_->Start(demuxer_.get(), CreateRenderer(), this,
+ base::Bind(&PipelineIntegrationTest::OnStatusCallback,
+ base::Unretained(this)));
message_loop_.Run();
EXPECT_EQ(PIPELINE_OK, pipeline_status_);
return pipeline_status_;
@@ -740,9 +729,9 @@ class PipelineIntegrationTest : public PipelineIntegrationTestHost {
EXPECT_CALL(*this, OnMetadata(_))
.Times(AtMost(1))
.WillRepeatedly(SaveArg<0>(&metadata_));
- EXPECT_CALL(*this, OnBufferingStateChanged(BUFFERING_HAVE_ENOUGH))
+ EXPECT_CALL(*this, OnBufferingStateChange(BUFFERING_HAVE_ENOUGH))
.Times(AnyNumber());
- EXPECT_CALL(*this, OnBufferingStateChanged(BUFFERING_HAVE_NOTHING))
+ EXPECT_CALL(*this, OnBufferingStateChange(BUFFERING_HAVE_NOTHING))
.Times(AnyNumber());
EXPECT_CALL(*this, DecryptorAttached(true));
@@ -756,20 +745,9 @@ class PipelineIntegrationTest : public PipelineIntegrationTestHost {
base::Bind(&PipelineIntegrationTest::DecryptorAttached,
base::Unretained(this)));
- pipeline_->Start(
- demuxer_.get(), CreateRenderer(),
- base::Bind(&PipelineIntegrationTest::OnEnded, base::Unretained(this)),
- base::Bind(&PipelineIntegrationTest::OnError, base::Unretained(this)),
- base::Bind(&PipelineIntegrationTest::OnStatusCallback,
- base::Unretained(this)),
- base::Bind(&PipelineIntegrationTest::OnMetadata,
- base::Unretained(this)),
- base::Bind(&PipelineIntegrationTest::OnBufferingStateChanged,
- base::Unretained(this)),
- base::Closure(), base::Bind(&PipelineIntegrationTest::OnAddTextTrack,
- base::Unretained(this)),
- base::Bind(&PipelineIntegrationTest::OnWaitingForDecryptionKey,
- base::Unretained(this)));
+ pipeline_->Start(demuxer_.get(), CreateRenderer(), this,
+ base::Bind(&PipelineIntegrationTest::OnStatusCallback,
+ base::Unretained(this)));
source->set_encrypted_media_init_data_cb(
base::Bind(&FakeEncryptedMedia::OnEncryptedMediaInitData,

Powered by Google App Engine
This is Rietveld 408576698