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

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

Issue 1964253002: Bug Fix: Rendering stuck due to thread issue of WebMediaPlayerMSCompositor (M51) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 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 d930ddc740eabe500c7dda7e6d17d61c1d458fa4..403389cdda816357ee2df05c008b063ac7e7fb78 100644
--- a/content/renderer/media/webmediaplayer_ms_unittest.cc
+++ b/content/renderer/media/webmediaplayer_ms_unittest.cc
@@ -597,10 +597,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);
@@ -633,20 +633,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);
@@ -685,18 +685,18 @@ TEST_F(WebMediaPlayerMSTest, BackgroudRendering) {
// 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