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

Unified Diff: media/mojo/clients/mojo_renderer_unittest.cc

Issue 2276663003: Fix DCHECK in MojoRendererService::SetPlaybackRate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unit test Created 4 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 | « no previous file | media/mojo/services/mojo_renderer_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/clients/mojo_renderer_unittest.cc
diff --git a/media/mojo/clients/mojo_renderer_unittest.cc b/media/mojo/clients/mojo_renderer_unittest.cc
index 75cf5e06242a6b2bfdaa34877c945e600eb2fa8f..00d61f056486c6926b1cbf8538c1f79baca71f30 100644
--- a/media/mojo/clients/mojo_renderer_unittest.cc
+++ b/media/mojo/clients/mojo_renderer_unittest.cc
@@ -379,4 +379,18 @@ TEST_F(MojoRendererTest, Destroy_PendingSetCdm) {
// TODO(xhwang): Add more tests on OnError. For example, ErrorDuringFlush,
// ErrorAfterFlush etc.
+TEST_F(MojoRendererTest, ErrorDuringPlayback) {
+ Initialize();
+
+ EXPECT_CALL(renderer_client_, OnError(PIPELINE_ERROR_DECODE)).Times(1);
+
+ Play();
+ remote_renderer_client_->OnError(PIPELINE_ERROR_DECODE);
+ base::RunLoop().RunUntilIdle();
+
+ EXPECT_CALL(*mock_renderer_, SetPlaybackRate(0.0)).Times(1);
+ mojo_renderer_->SetPlaybackRate(0.0);
+ Flush();
+}
+
} // namespace media
« no previous file with comments | « no previous file | media/mojo/services/mojo_renderer_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698