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

Side by Side Diff: net/dns/address_sorter_posix_unittest.cc

Issue 2508593002: net: move udp directory into socket (Closed)
Patch Set: revert sys/socket.h change Created 4 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 unified diff | Download patch
« no previous file with comments | « net/dns/address_sorter_posix.cc ('k') | net/dns/dns_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/dns/address_sorter_posix.h" 5 #include "net/dns/address_sorter_posix.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "net/base/ip_address.h" 10 #include "net/base/ip_address.h"
11 #include "net/base/net_errors.h" 11 #include "net/base/net_errors.h"
12 #include "net/base/test_completion_callback.h" 12 #include "net/base/test_completion_callback.h"
13 #include "net/log/net_log_with_source.h" 13 #include "net/log/net_log_with_source.h"
14 #include "net/socket/client_socket_factory.h" 14 #include "net/socket/client_socket_factory.h"
15 #include "net/socket/datagram_client_socket.h"
15 #include "net/socket/socket_performance_watcher.h" 16 #include "net/socket/socket_performance_watcher.h"
16 #include "net/socket/ssl_client_socket.h" 17 #include "net/socket/ssl_client_socket.h"
17 #include "net/socket/stream_socket.h" 18 #include "net/socket/stream_socket.h"
18 #include "net/udp/datagram_client_socket.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 20
21 namespace net { 21 namespace net {
22 namespace { 22 namespace {
23 23
24 // Used to map destination address to source address. 24 // Used to map destination address to source address.
25 typedef std::map<IPAddress, IPAddress> AddressMapping; 25 typedef std::map<IPAddress, IPAddress> AddressMapping;
26 26
27 IPAddress ParseIP(const std::string& str) { 27 IPAddress ParseIP(const std::string& str) {
28 IPAddress addr; 28 IPAddress addr;
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 AddMapping("4000::1", "4000::10"); // global unicast 329 AddMapping("4000::1", "4000::10"); // global unicast
330 AddMapping("ff32::2", "fe81::20"); // deprecated link-local multicast 330 AddMapping("ff32::2", "fe81::20"); // deprecated link-local multicast
331 GetSourceInfo("fe81::20")->deprecated = true; 331 GetSourceInfo("fe81::20")->deprecated = true;
332 const char* const addresses[] = { "ff3e::1", "ff32::2", "4000::1", "ff32::1", 332 const char* const addresses[] = { "ff3e::1", "ff32::2", "4000::1", "ff32::1",
333 "::1", "8.0.0.1", NULL }; 333 "::1", "8.0.0.1", NULL };
334 const int order[] = { 4, 3, 0, 2, 1, -1 }; 334 const int order[] = { 4, 3, 0, 2, 1, -1 };
335 Verify(addresses, order); 335 Verify(addresses, order);
336 } 336 }
337 337
338 } // namespace net 338 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/address_sorter_posix.cc ('k') | net/dns/dns_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698