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

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

Issue 1132903002: [MediaRouter] Add implementation of PresentationServiceDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: chrome/browser/media/router/media_source_helper_unittest.cc
diff --git a/chrome/browser/media/router/media_source_helper_unittest.cc b/chrome/browser/media/router/media_source_helper_unittest.cc
index fe360465328fb133e007ced460e979d9f29dce0f..58437d36d22032c9335a1f17c075ae982f90a8c2 100644
--- a/chrome/browser/media/router/media_source_helper_unittest.cc
+++ b/chrome/browser/media/router/media_source_helper_unittest.cc
@@ -40,5 +40,12 @@ TEST(MediaSourcesTest, IsValidMediaSource) {
EXPECT_FALSE(IsValidMediaSource(ForPresentationUrl("totally not a url")));
}
+TEST(MediaSourcesTest, GetPresentationUrl) {
+ EXPECT_EQ("", GetPresentationUrl(ForTabMediaSource(123)));
+ EXPECT_EQ("", GetPresentationUrl(ForDesktopMediaSource()));
+ EXPECT_EQ("http://example.com/",
+ GetPresentationUrl(ForPresentationUrl("http://example.com/")));
Wez 2015/05/27 22:37:49 nit: Test the invalid-source case as well.
haibinlu 2015/05/28 21:44:02 the first 2 cases are invalid ones.
+}
+
} // namespace media_router

Powered by Google App Engine
This is Rietveld 408576698