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

Unified Diff: media/filters/pipeline_integration_test_base.cc

Issue 10854151: Allow transitioning to HAVE_METADATA before pipeline initialization completes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and address final comments 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
« no previous file with comments | « media/filters/pipeline_integration_test_base.h ('k') | media/tools/player_wtl/movie.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/pipeline_integration_test_base.cc
diff --git a/media/filters/pipeline_integration_test_base.cc b/media/filters/pipeline_integration_test_base.cc
index 76152eda8783133c202bc85e00fd436ebc1cea09..1e961a8122f660aef6027df6f6404dc321bcb6c0 100644
--- a/media/filters/pipeline_integration_test_base.cc
+++ b/media/filters/pipeline_integration_test_base.cc
@@ -88,11 +88,15 @@ void PipelineIntegrationTestBase::OnError(PipelineStatus status) {
bool PipelineIntegrationTestBase::Start(const std::string& url,
PipelineStatus expected_status) {
+ EXPECT_CALL(*this, OnBufferingState(Pipeline::kHaveMetadata));
+ EXPECT_CALL(*this, OnBufferingState(Pipeline::kPrerollCompleted));
pipeline_->Start(
CreateFilterCollection(url),
base::Bind(&PipelineIntegrationTestBase::OnEnded, base::Unretained(this)),
base::Bind(&PipelineIntegrationTestBase::OnError, base::Unretained(this)),
- QuitOnStatusCB(expected_status));
+ QuitOnStatusCB(expected_status),
+ base::Bind(&PipelineIntegrationTestBase::OnBufferingState,
+ base::Unretained(this)));
message_loop_.Run();
return (pipeline_status_ == PIPELINE_OK);
}
@@ -105,11 +109,15 @@ bool PipelineIntegrationTestBase::Start(const std::string& url,
}
bool PipelineIntegrationTestBase::Start(const std::string& url) {
+ EXPECT_CALL(*this, OnBufferingState(Pipeline::kHaveMetadata));
+ EXPECT_CALL(*this, OnBufferingState(Pipeline::kPrerollCompleted));
pipeline_->Start(
CreateFilterCollection(url),
base::Bind(&PipelineIntegrationTestBase::OnEnded, base::Unretained(this)),
base::Bind(&PipelineIntegrationTestBase::OnError, base::Unretained(this)),
base::Bind(&PipelineIntegrationTestBase::OnStatusCallback,
+ base::Unretained(this)),
+ base::Bind(&PipelineIntegrationTestBase::OnBufferingState,
base::Unretained(this)));
message_loop_.Run();
return (pipeline_status_ == PIPELINE_OK);
@@ -126,6 +134,7 @@ void PipelineIntegrationTestBase::Pause() {
bool PipelineIntegrationTestBase::Seek(base::TimeDelta seek_time) {
ended_ = false;
+ EXPECT_CALL(*this, OnBufferingState(Pipeline::kPrerollCompleted));
pipeline_->Seek(seek_time, QuitOnStatusCB(PIPELINE_OK));
message_loop_.Run();
return (pipeline_status_ == PIPELINE_OK);
« no previous file with comments | « media/filters/pipeline_integration_test_base.h ('k') | media/tools/player_wtl/movie.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698