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

Unified Diff: content/renderer/media/webmediaplayer_ms_unittest.cc

Issue 1930003002: Bug Fix: Rendering stuck due to thread issue of WebMediaPlayerMSCompositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: content/renderer/media/webmediaplayer_ms_unittest.cc
diff --git a/content/renderer/media/webmediaplayer_ms_unittest.cc b/content/renderer/media/webmediaplayer_ms_unittest.cc
index e3b7530347a975b2cc4f0d83af5974f19eb42469..6547dbe65e865b99b5c3eb63613eb6554834608a 100644
--- a/content/renderer/media/webmediaplayer_ms_unittest.cc
+++ b/content/renderer/media/webmediaplayer_ms_unittest.cc
@@ -634,10 +634,10 @@ TEST_P(WebMediaPlayerMSTest, PlayThenPause) {
// Here we call pause, and expect a freezing frame.
EXPECT_CALL(*this, DoStopRendering());
player_.pause();
- auto prev_frame = compositor_->GetCurrentFrame();
+ auto prev_frame = compositor_->current_frame();
message_loop_controller_.RunAndWaitForStatus(
media::PipelineStatus::PIPELINE_OK);
- auto after_frame = compositor_->GetCurrentFrame();
+ auto after_frame = compositor_->current_frame();
EXPECT_EQ(prev_frame->timestamp(), after_frame->timestamp());
testing::Mock::VerifyAndClearExpectations(this);
@@ -675,20 +675,20 @@ TEST_P(WebMediaPlayerMSTest, PlayThenPauseThenPlay) {
// Here we call pause, and expect a freezing frame.
EXPECT_CALL(*this, DoStopRendering());
player_.pause();
- auto prev_frame = compositor_->GetCurrentFrame();
+ auto prev_frame = compositor_->current_frame();
message_loop_controller_.RunAndWaitForStatus(
media::PipelineStatus::PIPELINE_OK);
- auto after_frame = compositor_->GetCurrentFrame();
+ auto after_frame = compositor_->current_frame();
EXPECT_EQ(prev_frame->timestamp(), after_frame->timestamp());
testing::Mock::VerifyAndClearExpectations(this);
// We resume the player, and expect rendering can continue.
EXPECT_CALL(*this, DoStartRendering());
player_.play();
- prev_frame = compositor_->GetCurrentFrame();
+ prev_frame = compositor_->current_frame();
message_loop_controller_.RunAndWaitForStatus(
media::PipelineStatus::PIPELINE_OK);
- after_frame = compositor_->GetCurrentFrame();
+ after_frame = compositor_->current_frame();
EXPECT_NE(prev_frame->timestamp(), after_frame->timestamp());
testing::Mock::VerifyAndClearExpectations(this);
@@ -731,18 +731,18 @@ TEST_F(WebMediaPlayerMSTest, BackgroundRendering) {
// Switch to background rendering, expect rendering to continue.
SetBackgroundRendering(true);
- auto prev_frame = compositor_->GetCurrentFrame();
+ auto prev_frame = compositor_->current_frame();
message_loop_controller_.RunAndWaitForStatus(
media::PipelineStatus::PIPELINE_OK);
- auto after_frame = compositor_->GetCurrentFrame();
+ auto after_frame = compositor_->current_frame();
EXPECT_NE(prev_frame->timestamp(), after_frame->timestamp());
// Switch to foreground rendering.
SetBackgroundRendering(false);
- prev_frame = compositor_->GetCurrentFrame();
+ prev_frame = compositor_->current_frame();
message_loop_controller_.RunAndWaitForStatus(
media::PipelineStatus::PIPELINE_OK);
- after_frame = compositor_->GetCurrentFrame();
+ after_frame = compositor_->current_frame();
EXPECT_NE(prev_frame->timestamp(), after_frame->timestamp());
testing::Mock::VerifyAndClearExpectations(this);

Powered by Google App Engine
This is Rietveld 408576698