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

Unified Diff: chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc

Issue 2927503002: [Presentation API / Media Router] Relax PresentationRequest URL check. (Closed)
Patch Set: Really add #include Created 3 years, 6 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: chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc
diff --git a/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc b/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc
index 29d87f0677e8a7a88681680bee20db56a9b78931..d1e9450508314dfee34137df48b262f3a86332aa 100644
--- a/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc
+++ b/chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc
@@ -320,6 +320,14 @@ TEST_F(PresentationServiceDelegateImplTest, AddSameListenerTwice) {
main_frame_process_id_, main_frame_routing_id_, source1_.id()));
}
+TEST_F(PresentationServiceDelegateImplTest, AddListenerForInvalidUrl) {
+ MockScreenAvailabilityListener listener(GURL("unsupported-url://foo"));
+ EXPECT_CALL(listener, OnScreenAvailabilityChanged(false));
+ EXPECT_FALSE(delegate_impl_->AddScreenAvailabilityListener(
+ main_frame_process_id_, main_frame_routing_id_, &listener));
+ EXPECT_CALL(router_, RegisterMediaSinksObserver(_)).Times(0);
+}
+
// TODO(imcheng): Add a test to set default presentation URL in a different
// RenderFrameHost and verify that it is ignored.
TEST_F(PresentationServiceDelegateImplTest, SetDefaultPresentationUrl) {
« no previous file with comments | « chrome/browser/media/router/presentation_service_delegate_impl.cc ('k') | chrome/common/media_router/media_source_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698