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

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: Function Rename 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
« no previous file with comments | « content/renderer/media/webmediaplayer_ms_compositor.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..70520aac26b9e613a9fd83c008a960b89bad6388 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_->GetCurrentFrameWithoutUpdatingStatistics();
message_loop_controller_.RunAndWaitForStatus(
media::PipelineStatus::PIPELINE_OK);
- auto after_frame = compositor_->GetCurrentFrame();
+ auto after_frame = compositor_->GetCurrentFrameWithoutUpdatingStatistics();
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_->GetCurrentFrameWithoutUpdatingStatistics();
message_loop_controller_.RunAndWaitForStatus(
media::PipelineStatus::PIPELINE_OK);
- auto after_frame = compositor_->GetCurrentFrame();
+ auto after_frame = compositor_->GetCurrentFrameWithoutUpdatingStatistics();
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_->GetCurrentFrameWithoutUpdatingStatistics();
message_loop_controller_.RunAndWaitForStatus(
media::PipelineStatus::PIPELINE_OK);
- after_frame = compositor_->GetCurrentFrame();
+ after_frame = compositor_->GetCurrentFrameWithoutUpdatingStatistics();
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_->GetCurrentFrameWithoutUpdatingStatistics();
message_loop_controller_.RunAndWaitForStatus(
media::PipelineStatus::PIPELINE_OK);
- auto after_frame = compositor_->GetCurrentFrame();
+ auto after_frame = compositor_->GetCurrentFrameWithoutUpdatingStatistics();
EXPECT_NE(prev_frame->timestamp(), after_frame->timestamp());
// Switch to foreground rendering.
SetBackgroundRendering(false);
- prev_frame = compositor_->GetCurrentFrame();
+ prev_frame = compositor_->GetCurrentFrameWithoutUpdatingStatistics();
message_loop_controller_.RunAndWaitForStatus(
media::PipelineStatus::PIPELINE_OK);
- after_frame = compositor_->GetCurrentFrame();
+ after_frame = compositor_->GetCurrentFrameWithoutUpdatingStatistics();
EXPECT_NE(prev_frame->timestamp(), after_frame->timestamp());
testing::Mock::VerifyAndClearExpectations(this);
« no previous file with comments | « content/renderer/media/webmediaplayer_ms_compositor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698