aboutsummaryrefslogtreecommitdiff
path: root/cast/sender
diff options
context:
space:
mode:
authorRyan Keane <rwkeane@google.com>2020-03-27 15:17:09 -0700
committerCommit Bot <commit-bot@chromium.org>2020-03-27 23:05:44 +0000
commite5b4b11496a0bbf88317e4c58099dfd7a01cf4ca (patch)
tree58b9fd2586bc8af43b53d2c966b5cc0177153862 /cast/sender
parente928c969dbb546b19512598cffb36fc25970013b (diff)
downloadopenscreen-e5b4b11496a0bbf88317e4c58099dfd7a01cf4ca.tar.gz
Discovery: Split ServiceInfo fields
This CL services 2 purposes: 1) Update the ServiceInfo class to more closely align with how it is used in practice. 2) Split a change off of a larger CL to make that one smaller and touch less files: https://chromium-review.googlesource.com/c/openscreen/+/2093012 There should be no functionality changes introduced in this CL Change-Id: I788836b3fa2b37779f7571aef34e059569fcbc79 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2125224 Reviewed-by: Jordan Bayles <jophba@chromium.org> Commit-Queue: Ryan Keane <rwkeane@google.com>
Diffstat (limited to 'cast/sender')
-rw-r--r--cast/sender/cast_app_discovery_service_impl_unittest.cc6
-rw-r--r--cast/sender/cast_platform_client_unittest.cc3
2 files changed, 6 insertions, 3 deletions
diff --git a/cast/sender/cast_app_discovery_service_impl_unittest.cc b/cast/sender/cast_app_discovery_service_impl_unittest.cc
index bfe596a8..863eb347 100644
--- a/cast/sender/cast_app_discovery_service_impl_unittest.cc
+++ b/cast/sender/cast_app_discovery_service_impl_unittest.cc
@@ -29,7 +29,8 @@ class CastAppDiscoveryServiceImplTest : public ::testing::Test {
router_.TakeSocket(&mock_error_handler_,
std::move(fake_cast_socket_pair_.socket));
- receiver_.v4_endpoint = fake_cast_socket_pair_.remote_endpoint;
+ receiver_.v4_address = fake_cast_socket_pair_.remote_endpoint.address;
+ receiver_.port = fake_cast_socket_pair_.remote_endpoint.port;
receiver_.unique_id = "deviceId1";
receiver_.friendly_name = "Some Name";
}
@@ -254,7 +255,8 @@ TEST_F(CastAppDiscoveryServiceImplTest,
router_.TakeSocket(&mock_error_handler_, std::move(fake_sockets2.socket));
ServiceInfo receiver2;
receiver2.unique_id = "deviceId2";
- receiver2.v4_endpoint = fake_sockets2.remote_endpoint;
+ receiver2.v4_address = fake_sockets2.remote_endpoint.address;
+ receiver2.port = fake_sockets2.remote_endpoint.port;
// Adding new receiver causes availability requests for both apps to be sent
// to the new receiver.
diff --git a/cast/sender/cast_platform_client_unittest.cc b/cast/sender/cast_platform_client_unittest.cc
index e4f3769b..44e99660 100644
--- a/cast/sender/cast_platform_client_unittest.cc
+++ b/cast/sender/cast_platform_client_unittest.cc
@@ -31,7 +31,8 @@ class CastPlatformClientTest : public ::testing::Test {
router_.TakeSocket(&mock_error_handler_,
std::move(fake_cast_socket_pair_.socket));
- receiver_.v4_endpoint = IPEndpoint{{192, 168, 0, 17}, 4434};
+ receiver_.v4_address = IPAddress{192, 168, 0, 17};
+ receiver_.port = 4434;
receiver_.unique_id = "deviceId1";
platform_client_.AddOrUpdateReceiver(receiver_, socket_->socket_id());
}