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

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

Issue 2679893002: [Media Router] Add ProvideSinks() Mojo API (Closed)
Patch Set: fix android compile error Created 3 years, 8 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/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 b4718cc340ec9d56203d597be812c7810e53213c..55fc969b5891920e37499c54999fc90c130dd9be 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
@@ -1204,6 +1204,25 @@ TEST_F(MediaRouterMojoImplTest, SearchSinks) {
run_loop.RunUntilIdle();
}
+TEST_F(MediaRouterMojoImplTest, ProvideSinks) {
+ std::vector<MediaSinkInternal> sinks;
+ MediaSink sink(kSinkId, kSinkName, MediaSink::IconType::CAST);
+ CastSinkExtraData extra_data;
+ EXPECT_TRUE(extra_data.ip_address.AssignFromIPLiteral("192.168.1.3"));
+ extra_data.capabilities = 2;
+ extra_data.cast_channel_id = 3;
+ MediaSinkInternal expected_sink(sink, extra_data);
+ sinks.push_back(expected_sink);
+ std::string provider_name = "cast";
+
+ EXPECT_CALL(mock_media_route_provider_, ProvideSinks(provider_name, sinks));
+
+ router()->ProvideSinks(provider_name, sinks);
+
+ base::RunLoop run_loop;
+ run_loop.RunUntilIdle();
+}
+
class MediaRouterMojoExtensionTest : public ::testing::Test {
public:
MediaRouterMojoExtensionTest() : process_manager_(nullptr) {}

Powered by Google App Engine
This is Rietveld 408576698