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

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

Issue 2714783002: [Presentation API] (browser side) Implement reconnect() for 1-UA mode (Closed)
Patch Set: remove duplicate unit tests Created 3 years, 10 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/offscreen_presentation_manager_unittest.cc
diff --git a/chrome/browser/media/router/offscreen_presentation_manager_unittest.cc b/chrome/browser/media/router/offscreen_presentation_manager_unittest.cc
index 4563517006cd4a9903ff0b360b0b288ba1f57b83..6a6c61d79417cfe76e7bfa60fbda065073bd6c0b 100644
--- a/chrome/browser/media/router/offscreen_presentation_manager_unittest.cc
+++ b/chrome/browser/media/router/offscreen_presentation_manager_unittest.cc
@@ -298,4 +298,23 @@ TEST_F(OffscreenPresentationManagerTest, TwoPresentations) {
VerifyPresentationsSize(1);
}
+TEST_F(OffscreenPresentationManagerTest, TestIsOffscreenPresentation) {
+ EXPECT_FALSE(manager()->IsOffscreenPresentation(kPresentationId));
+ content::PresentationConnectionPtr controller1;
+ RegisterController(kPresentationId, std::move(controller1));
+ EXPECT_TRUE(manager()->IsOffscreenPresentation(kPresentationId));
+}
+
+TEST_F(OffscreenPresentationManagerTest, TestRegisterAndGetRoute) {
+ MediaSource source("source_1");
+ MediaRoute route("route_1", source, "sink_1", "", false, "", false);
+
+ EXPECT_FALSE(manager()->GetRoute(kPresentationId));
+ manager()->RegisterOffscreenPresentationRoute(kPresentationId,
+ GURL(kPresentationUrl), route);
+ auto* actual_route = manager()->GetRoute(kPresentationId);
+ EXPECT_TRUE(actual_route);
+ EXPECT_TRUE(route.Equals(*actual_route));
+}
+
} // namespace media_router

Powered by Google App Engine
This is Rietveld 408576698