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

Unified Diff: net/dns/dns_config_service_win_unittest.cc

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « net/disk_cache/simple/simple_util_win.cc ('k') | net/dns/host_resolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_config_service_win_unittest.cc
diff --git a/net/dns/dns_config_service_win_unittest.cc b/net/dns/dns_config_service_win_unittest.cc
index 7ac01d1e536fd1e431c85e74f77dcc9a96ee60fa..54a6411ee78a69d83608f7c8e066cf961d344ebc 100644
--- a/net/dns/dns_config_service_win_unittest.cc
+++ b/net/dns/dns_config_service_win_unittest.cc
@@ -55,7 +55,7 @@ struct AdapterInfo {
IF_OPER_STATUS oper_status;
const WCHAR* dns_suffix;
std::string dns_server_addresses[4]; // Empty string indicates end.
- int ports[4];
+ uint16 ports[4];
};
scoped_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> CreateAdapterAddresses(
@@ -102,7 +102,7 @@ scoped_ptr<IP_ADAPTER_ADDRESSES, base::FreeDeleter> CreateAdapterAddresses(
}
IPAddressNumber ip;
CHECK(ParseIPLiteralToNumber(info.dns_server_addresses[j], &ip));
- IPEndPoint ipe(ip, info.ports[j]);
+ IPEndPoint ipe = IPEndPoint(ip, info.ports[j]);
address->Address.lpSockaddr =
reinterpret_cast<LPSOCKADDR>(storage + num_addresses);
socklen_t length = sizeof(struct sockaddr_storage);
@@ -120,7 +120,7 @@ TEST(DnsConfigServiceWinTest, ConvertAdapterAddresses) {
AdapterInfo input_adapters[4]; // |if_type| == 0 indicates end.
std::string expected_nameservers[4]; // Empty string indicates end.
std::string expected_suffix;
- int expected_ports[4];
+ uint16 expected_ports[4];
} cases[] = {
{ // Ignore loopback and inactive adapters.
{
@@ -181,7 +181,7 @@ TEST(DnsConfigServiceWinTest, ConvertAdapterAddresses) {
for (size_t j = 0; !t.expected_nameservers[j].empty(); ++j) {
IPAddressNumber ip;
ASSERT_TRUE(ParseIPLiteralToNumber(t.expected_nameservers[j], &ip));
- int port = t.expected_ports[j];
+ uint16 port = t.expected_ports[j];
if (!port)
port = dns_protocol::kDefaultPort;
expected_nameservers.push_back(IPEndPoint(ip, port));
« no previous file with comments | « net/disk_cache/simple/simple_util_win.cc ('k') | net/dns/host_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698