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

Side by Side Diff: webrtc/base/ipaddress_unittest.cc

Issue 1584793004: Fix IPAddress::ToSensitiveString() to avoid dependency on inet_ntop(). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « webrtc/base/ipaddress.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 "2620:0:1008:1201:a248:1cff:fe98:360"; 54 "2620:0:1008:1201:a248:1cff:fe98:360";
55 static const std::string kIPv6TemporaryAddrString = 55 static const std::string kIPv6TemporaryAddrString =
56 "2620:0:1008:1201:2089:6dda:385e:80c0"; 56 "2620:0:1008:1201:2089:6dda:385e:80c0";
57 static const std::string kIPv6PublicAddrString = 57 static const std::string kIPv6PublicAddrString =
58 "2401:fa00:4:1000:be30:5bff:fee5:c3"; 58 "2401:fa00:4:1000:be30:5bff:fee5:c3";
59 static const std::string kIPv6PublicAddr2String = 59 static const std::string kIPv6PublicAddr2String =
60 "2401::1000:be30:5bff:fee5:c3"; 60 "2401::1000:be30:5bff:fee5:c3";
61 static const std::string kIPv6PublicAddrAnonymizedString = 61 static const std::string kIPv6PublicAddrAnonymizedString =
62 "2401:fa00:4:x:x:x:x:x"; 62 "2401:fa00:4:x:x:x:x:x";
63 static const std::string kIPv6PublicAddr2AnonymizedString = 63 static const std::string kIPv6PublicAddr2AnonymizedString =
64 "2401::x:x:x:x:x"; 64 "2401:0:0:x:x:x:x:x";
65 static const std::string kIPv4MappedAnyAddrString = "::ffff:0:0"; 65 static const std::string kIPv4MappedAnyAddrString = "::ffff:0:0";
66 static const std::string kIPv4MappedRFC1918AddrString = "::ffff:c0a8:701"; 66 static const std::string kIPv4MappedRFC1918AddrString = "::ffff:c0a8:701";
67 static const std::string kIPv4MappedLoopbackAddrString = "::ffff:7f00:1"; 67 static const std::string kIPv4MappedLoopbackAddrString = "::ffff:7f00:1";
68 static const std::string kIPv4MappedPublicAddrString = "::ffff:102:0304"; 68 static const std::string kIPv4MappedPublicAddrString = "::ffff:102:0304";
69 static const std::string kIPv4MappedV4StyleAddrString = "::ffff:192.168.7.1"; 69 static const std::string kIPv4MappedV4StyleAddrString = "::ffff:192.168.7.1";
70 70
71 static const std::string kIPv4BrokenString1 = "192.168.7."; 71 static const std::string kIPv4BrokenString1 = "192.168.7.";
72 static const std::string kIPv4BrokenString2 = "192.168.7.1.1"; 72 static const std::string kIPv4BrokenString2 = "192.168.7.1.1";
73 static const std::string kIPv4BrokenString3 = "192.168.7.1:80"; 73 static const std::string kIPv4BrokenString3 = "192.168.7.1:80";
74 static const std::string kIPv4BrokenString4 = "192.168.7.ONE"; 74 static const std::string kIPv4BrokenString4 = "192.168.7.ONE";
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 IPAddress *paddr1 = &addr1; 944 IPAddress *paddr1 = &addr1;
945 IPAddress *paddr4 = &addr4; 945 IPAddress *paddr4 = &addr4;
946 EXPECT_EQ(*paddr1, *paddr4); 946 EXPECT_EQ(*paddr1, *paddr4);
947 947
948 InterfaceAddress addr5(kIPv6LinkLocalAddr, 948 InterfaceAddress addr5(kIPv6LinkLocalAddr,
949 IPV6_ADDRESS_FLAG_TEMPORARY); 949 IPV6_ADDRESS_FLAG_TEMPORARY);
950 EXPECT_NE(addr1, addr5); 950 EXPECT_NE(addr1, addr5);
951 } 951 }
952 952
953 } // namespace rtc 953 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/ipaddress.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698