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

Unified Diff: chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc

Issue 1971893002: [MediaRouter] Update JoinRoute behavior to allow non-local routes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to imcheng@ comment Created 4 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
« no previous file with comments | « chrome/browser/media/router/mojo/media_router_mojo_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc b/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc
index 5fce15f5bfdf3d0c7995fbb4e5b6d6e075ce9d03..6d7bf6875e14cbbdcc4caa95eca06c97af45bd0a 100644
--- a/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc
+++ b/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc
@@ -383,17 +383,17 @@ TEST_F(MediaRouterMojoImplTest, OffTheRecordRoutesTerminatedOnProfileShutdown) {
TEST_F(MediaRouterMojoImplTest, JoinRoute) {
MediaSource media_source(kSource);
-
MediaRoute expected_route(kRouteId, media_source, kSinkId, "", false, "",
false);
interfaces::MediaRoutePtr route = CreateMojoRoute();
// Make sure the MR has received an update with the route, so it knows there
- // is a local route to join.
+ // is a route to join.
mojo::Array<interfaces::MediaRoutePtr> mojo_routes(1);
mojo_routes[0] = route->Clone();
router()->OnRoutesUpdated(std::move(mojo_routes), mojo::String(),
mojo::Array<mojo::String>());
+ EXPECT_TRUE(router()->HasJoinableRoute());
// Use a lambda function as an invocation target here to work around
// a limitation with GMock::Invoke that prevents it from using move-only types
@@ -442,11 +442,12 @@ TEST_F(MediaRouterMojoImplTest, JoinRouteNotFoundFails) {
TEST_F(MediaRouterMojoImplTest, JoinRouteTimedOutFails) {
// Make sure the MR has received an update with the route, so it knows there
- // is a local route to join.
+ // is a route to join.
mojo::Array<interfaces::MediaRoutePtr> mojo_routes(1);
mojo_routes[0] = CreateMojoRoute();
router()->OnRoutesUpdated(std::move(mojo_routes), mojo::String(),
mojo::Array<mojo::String>());
+ EXPECT_TRUE(router()->HasJoinableRoute());
EXPECT_CALL(
mock_media_route_provider_,
@@ -479,11 +480,12 @@ TEST_F(MediaRouterMojoImplTest, JoinRouteOffTheRecordMismatchFails) {
interfaces::MediaRoutePtr route = CreateMojoRoute();
// Make sure the MR has received an update with the route, so it knows there
- // is a local route to join.
+ // is a route to join.
mojo::Array<interfaces::MediaRoutePtr> mojo_routes(1);
mojo_routes[0] = route->Clone();
router()->OnRoutesUpdated(std::move(mojo_routes), mojo::String(),
mojo::Array<mojo::String>());
+ EXPECT_TRUE(router()->HasJoinableRoute());
// Use a lambda function as an invocation target here to work around
// a limitation with GMock::Invoke that prevents it from using move-only types
« no previous file with comments | « chrome/browser/media/router/mojo/media_router_mojo_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698