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

Unified Diff: content/browser/media/session/media_session_impl_service_routing_unittest.cc

Issue 2733843003: Fix a crash when receiving PAUSE action but no service is routed (Closed)
Patch Set: added unit tests Created 3 years, 9 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/browser/media/session/media_session_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/session/media_session_impl_service_routing_unittest.cc
diff --git a/content/browser/media/session/media_session_impl_service_routing_unittest.cc b/content/browser/media/session/media_session_impl_service_routing_unittest.cc
index ff969be22f82f8a2087d93a39661b1d92d4cf39f..48d1c2edf07484d11f75afd3c524a3f37fb3c1d3 100644
--- a/content/browser/media/session/media_session_impl_service_routing_unittest.cc
+++ b/content/browser/media/session/media_session_impl_service_routing_unittest.cc
@@ -402,4 +402,15 @@ TEST_F(MediaSessionImplServiceRoutingTest,
run_loop.Run();
}
+TEST_F(MediaSessionImplServiceRoutingTest,
+ TestReceivingPauseActionWhenNoServiceRouted) {
+ CreateServiceForFrame(main_frame_);
+ CreateServiceForFrame(sub_frame_);
+
+ ASSERT_EQ(nullptr, ComputeServiceForRouting());
+
+ MediaSessionImpl::Get(contents())
+ ->DidReceiveAction(blink::mojom::MediaSessionAction::PAUSE);
mlamouri (slow - plz ping) 2017/03/06 19:19:07 Add a comment that it should not crash.
+}
+
} // namespace content
« no previous file with comments | « content/browser/media/session/media_session_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698