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

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

Issue 1415103006: Non-Local Join for Media Router and Presentation API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review Fixes Created 5 years 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_session_state_observer_unittest.cc
diff --git a/chrome/browser/media/router/presentation_session_state_observer_unittest.cc b/chrome/browser/media/router/presentation_session_state_observer_unittest.cc
index e58e5531b9b5250c059c7187e14f97db87521eed..98bba045ca432ff2acc6497bf37a981dfe38ee29 100644
--- a/chrome/browser/media/router/presentation_session_state_observer_unittest.cc
+++ b/chrome/browser/media/router/presentation_session_state_observer_unittest.cc
@@ -90,21 +90,25 @@ TEST_F(PresentationSessionStateObserverTest, InvokeCallbackWithDisconnected) {
// Route list update is expected to follow creation of route.
std::vector<MediaRoute> routes;
+ MediaSource media_source = MediaSourceForPresentationUrl(kPresentationUrl);
routes.push_back(MediaRoute(route_id,
- MediaSourceForPresentationUrl(kPresentationUrl),
+ media_source,
"sinkId", "Description", true, "", false));
- observer_->OnRoutesUpdated(routes);
+ observer_->OnRoutesUpdated(routes,
+ std::vector<MediaRoute::Id>());
// New route list does not contain |route_id|, which means it is disconnected.
EXPECT_CALL(*this, OnSessionStateChanged(
PresentationSessionInfoEquals(session_info),
content::PRESENTATION_SESSION_STATE_DISCONNECTED));
- observer_->OnRoutesUpdated(std::vector<MediaRoute>());
+ observer_->OnRoutesUpdated(std::vector<MediaRoute>(),
+ std::vector<MediaRoute::Id>());
// Note that it is normally not possible for |route_id| to reappear. But in
// case it does, test that it does NOT invoke the callback with CONNECTED.
EXPECT_TRUE(testing::Mock::VerifyAndClearExpectations(this));
- observer_->OnRoutesUpdated(routes);
+ observer_->OnRoutesUpdated(routes,
+ std::vector<MediaRoute::Id>());
}
TEST_F(PresentationSessionStateObserverTest, Reset) {
@@ -115,18 +119,20 @@ TEST_F(PresentationSessionStateObserverTest, Reset) {
content::PRESENTATION_SESSION_STATE_CONNECTED));
MediaRoute::Id route_id(CreateRouteId(kPresentationUrl, kPresentationId));
observer_->OnPresentationSessionConnected(route_id);
-
+ MediaSource media_source = MediaSourceForPresentationUrl(kPresentationUrl);
// Route list update is expected to follow creation of route.
std::vector<MediaRoute> routes;
routes.push_back(MediaRoute(route_id,
- MediaSourceForPresentationUrl(kPresentationUrl),
+ media_source,
"sinkId", "Description", true, "", false));
- observer_->OnRoutesUpdated(routes);
+ observer_->OnRoutesUpdated(routes,
+ std::vector<MediaRoute::Id>());
// |route_id| is no longer being tracked.
observer_->Reset();
EXPECT_TRUE(testing::Mock::VerifyAndClearExpectations(this));
- observer_->OnRoutesUpdated(std::vector<MediaRoute>());
+ observer_->OnRoutesUpdated(std::vector<MediaRoute>(),
+ std::vector<MediaRoute::Id>());
}
} // namespace media_router

Powered by Google App Engine
This is Rietveld 408576698