Commit 34957445 authored by kmarshall's avatar kmarshall Committed by Commit bot

Re-add "ip_address" field to Mac MDNS response fields.

cl/1436373002 removed this field from the response, which created
inconsistent behavior between service_discovery_client_impl.cc
and service_discovery_client_mac.mm.

Also added test expectations to catch the regression.

BUG=560448
R=vitalybuka@chromium.org
CC=wez@chromium.org

Review URL: https://codereview.chromium.org/1467393002

Cr-Commit-Position: refs/heads/master@{#361187}
parent d256fd08
......@@ -352,6 +352,7 @@ void ServiceResolverImplMac::NetServiceContainer::OnResolveUpdate(
if (end_point.FromSockAddr(socket, length)) {
service_description_.address =
net::HostPortPair::FromIPEndPoint(end_point);
service_description_.ip_address = end_point.address();
break;
}
}
......
......@@ -147,8 +147,9 @@ TEST_F(ServiceDiscoveryClientMacTest, ServiceResolver) {
EXPECT_EQ(1, num_resolves_);
EXPECT_EQ(2u, last_service_description_.metadata.size());
EXPECT_EQ(kIp, last_service_description_.address.host());
EXPECT_EQ(ip_address, last_service_description_.ip_address);
EXPECT_EQ(kPort, last_service_description_.address.port());
EXPECT_EQ(kIp, last_service_description_.address.host());
}
} // namespace local_discovery
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment