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

Unified Diff: media/filters/pipeline_integration_test.cc

Issue 10854151: Allow transitioning to HAVE_METADATA before pipeline initialization completes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address CR comments and fix tests. Created 8 years, 4 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/filters/pipeline_integration_test.cc
diff --git a/media/filters/pipeline_integration_test.cc b/media/filters/pipeline_integration_test.cc
index aa53b1baf93da2d58239fc2aad51132e4d39a957..f83c14d1df71416846747337d1f00ebc929b3c7f 100644
--- a/media/filters/pipeline_integration_test.cc
+++ b/media/filters/pipeline_integration_test.cc
@@ -184,11 +184,15 @@ class PipelineIntegrationTest
public PipelineIntegrationTestBase {
public:
void StartPipelineWithMediaSource(MockMediaSource* source) {
+ EXPECT_CALL(*this, OnReadyState(Pipeline::kHaveMetadata));
+ EXPECT_CALL(*this, OnReadyState(Pipeline::kHaveEnoughData));
pipeline_->Start(
CreateFilterCollection(source, NULL),
base::Bind(&PipelineIntegrationTest::OnEnded, base::Unretained(this)),
base::Bind(&PipelineIntegrationTest::OnError, base::Unretained(this)),
- QuitOnStatusCB(PIPELINE_OK));
+ QuitOnStatusCB(PIPELINE_OK),
+ base::Bind(&PipelineIntegrationTest::OnReadyState,
+ base::Unretained(this)));
message_loop_.Run();
}
@@ -196,11 +200,15 @@ class PipelineIntegrationTest
void StartPipelineWithEncryptedMedia(
MockMediaSource* source,
FakeDecryptorClient* encrypted_media) {
+ EXPECT_CALL(*this, OnReadyState(Pipeline::kHaveMetadata));
+ EXPECT_CALL(*this, OnReadyState(Pipeline::kHaveEnoughData));
pipeline_->Start(
CreateFilterCollection(source, encrypted_media->decryptor()),
base::Bind(&PipelineIntegrationTest::OnEnded, base::Unretained(this)),
base::Bind(&PipelineIntegrationTest::OnError, base::Unretained(this)),
- QuitOnStatusCB(PIPELINE_OK));
+ QuitOnStatusCB(PIPELINE_OK),
+ base::Bind(&PipelineIntegrationTest::OnReadyState,
+ base::Unretained(this)));
source->set_decryptor_client(encrypted_media);

Powered by Google App Engine
This is Rietveld 408576698