| Index: chrome/browser/media/router/media_router_base_unittest.cc
|
| diff --git a/chrome/browser/media/router/media_router_base_unittest.cc b/chrome/browser/media/router/media_router_base_unittest.cc
|
| index 4b942cfcd1f2134bbe52d1fcac6e60c930fb5b54..9634afdff23f094207d839ead4c080cce42f10da 100644
|
| --- a/chrome/browser/media/router/media_router_base_unittest.cc
|
| +++ b/chrome/browser/media/router/media_router_base_unittest.cc
|
| @@ -136,4 +136,31 @@ TEST_F(MediaRouterBaseTest, GetCurrentRoutes) {
|
| EXPECT_TRUE(router_.GetCurrentRoutes().empty());
|
| }
|
|
|
| +TEST_F(MediaRouterBaseTest, GetPresentationRoute) {
|
| + MediaSource source1("source_1");
|
| + MediaSource source2("source_1");
|
| + MediaRoute route1("route_1", source1, "sink_1", "", false, "", false);
|
| + MediaRoute route2("route_2", source2, "sink_2", "", true, "", false);
|
| +
|
| + std::string presentation_id1("presentation_id1");
|
| + std::string presentation_id2("presentation_id2");
|
| + std::string presentation_id3("presentation_id3");
|
| +
|
| + EXPECT_FALSE(router_.GetPresentationRoute(presentation_id1));
|
| +
|
| + router_.RegisterPresentationRoute(presentation_id1, route1);
|
| + router_.RegisterPresentationRoute(presentation_id2, route2);
|
| +
|
| + auto* actual_route1 = router_.GetPresentationRoute(presentation_id1);
|
| + auto* actual_route2 = router_.GetPresentationRoute(presentation_id2);
|
| +
|
| + EXPECT_TRUE(actual_route1 && actual_route1->Equals(route1));
|
| + EXPECT_TRUE(actual_route2 && actual_route2->Equals(route2));
|
| + EXPECT_FALSE(router_.GetPresentationRoute(presentation_id3));
|
| +
|
| + router_.UnregisterPresentationRoute(presentation_id1);
|
| +
|
| + EXPECT_FALSE(router_.GetPresentationRoute(presentation_id1));
|
| +}
|
| +
|
| } // namespace media_router
|
|
|