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

Unified Diff: chrome/browser/ui/webui/media_router/media_router_webui_message_handler_unittest.cc

Issue 1605133002: [Media Router] Handle route creation where resolved route is not for display. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes per imcheng@'s comments. Created 4 years, 11 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/ui/webui/media_router/media_router_webui_message_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/media_router/media_router_webui_message_handler_unittest.cc
diff --git a/chrome/browser/ui/webui/media_router/media_router_webui_message_handler_unittest.cc b/chrome/browser/ui/webui/media_router/media_router_webui_message_handler_unittest.cc
index a936dd7c9a96ab98417eab23ef55d53def87d4a6..39b534100368d63f033fea5b9d6087becf8cab4f 100644
--- a/chrome/browser/ui/webui/media_router/media_router_webui_message_handler_unittest.cc
+++ b/chrome/browser/ui/webui/media_router/media_router_webui_message_handler_unittest.cc
@@ -174,9 +174,7 @@ TEST_F(MediaRouterWebUIMessageHandlerTest, OnCreateRouteResponseReceived) {
MediaRoute route(route_id, MediaSource("mediaSource"), sink_id, description,
is_local, "", true);
- EXPECT_CALL(*mock_media_router_ui_, GetRouteProviderExtensionId()).WillOnce(
- ReturnRef(provider_extension_id()));
- handler_->OnCreateRouteResponseReceived(sink_id, &route);
+ handler_->OnCreateRouteResponseReceived(sink_id, route.media_route_id());
EXPECT_EQ(1u, web_ui_->call_data().size());
const content::TestWebUI::CallData& call_data = *web_ui_->call_data()[0];
EXPECT_EQ("media_router.ui.onCreateRouteResponseReceived",
@@ -187,20 +185,9 @@ TEST_F(MediaRouterWebUIMessageHandlerTest, OnCreateRouteResponseReceived) {
EXPECT_EQ(sink_id, sink_id_value->GetString());
const base::Value* arg2 = call_data.arg2();
- const base::DictionaryValue* route_value = nullptr;
- ASSERT_TRUE(arg2->GetAsDictionary(&route_value));
-
- std::string value;
- EXPECT_TRUE(route_value->GetString("id", &value));
- EXPECT_EQ(route_id, value);
- EXPECT_TRUE(route_value->GetString("sinkId", &value));
- EXPECT_EQ(sink_id, value);
- EXPECT_TRUE(route_value->GetString("description", &value));
- EXPECT_EQ(description, value);
-
- bool actual_is_local = false;
- EXPECT_TRUE(route_value->GetBoolean("isLocal", &actual_is_local));
- EXPECT_EQ(is_local, actual_is_local);
+ const base::StringValue* route_id_value = nullptr;
+ ASSERT_TRUE(arg2->GetAsString(&route_id_value));
+ EXPECT_EQ(route_id, route_id_value->GetString());
}
TEST_F(MediaRouterWebUIMessageHandlerTest, UpdateIssue) {
« no previous file with comments | « chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698