OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/base/net_util.h" | 5 #include "net/base/net_util.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 {".", "", false}, | 1012 {".", "", false}, |
1013 {"9", "", false}, | 1013 {"9", "", false}, |
1014 {"9", "a", true}, | 1014 {"9", "a", true}, |
1015 {"9a", "", false}, | 1015 {"9a", "", false}, |
1016 {"9a", "a", true}, | 1016 {"9a", "a", true}, |
1017 {"a.", "", true}, | 1017 {"a.", "", true}, |
1018 {"a.a", "", true}, | 1018 {"a.a", "", true}, |
1019 {"9.a", "", true}, | 1019 {"9.a", "", true}, |
1020 {"a.9", "", false}, | 1020 {"a.9", "", false}, |
1021 {"_9a", "", false}, | 1021 {"_9a", "", false}, |
| 1022 {"-9a", "", false}, |
1022 {"a.a9", "", true}, | 1023 {"a.a9", "", true}, |
1023 {"a.9a", "", false}, | 1024 {"a.9a", "", false}, |
1024 {"a+9a", "", false}, | 1025 {"a+9a", "", false}, |
| 1026 {"-a.a9", "", true}, |
1025 {"1-.a-b", "", false}, | 1027 {"1-.a-b", "", false}, |
1026 {"1-2.a_b", "", true}, | 1028 {"1-2.a_b", "", true}, |
1027 {"a.b.c.d.e", "", true}, | 1029 {"a.b.c.d.e", "", true}, |
1028 {"1.2.3.4.e", "", true}, | 1030 {"1.2.3.4.e", "", true}, |
1029 {"a.b.c.d.5", "", false}, | 1031 {"a.b.c.d.5", "", false}, |
1030 {"1.2.3.4.e.", "", true}, | 1032 {"1.2.3.4.e.", "", true}, |
1031 {"a.b.c.d.5.", "", false}, | 1033 {"a.b.c.d.5.", "", false}, |
1032 }; | 1034 }; |
1033 | 1035 |
1034 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(compliant_host_cases); ++i) { | 1036 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(compliant_host_cases); ++i) { |
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2347 if (it->address[i] != 0) { | 2349 if (it->address[i] != 0) { |
2348 all_zeroes = false; | 2350 all_zeroes = false; |
2349 break; | 2351 break; |
2350 } | 2352 } |
2351 } | 2353 } |
2352 EXPECT_FALSE(all_zeroes); | 2354 EXPECT_FALSE(all_zeroes); |
2353 } | 2355 } |
2354 } | 2356 } |
2355 | 2357 |
2356 } // namespace net | 2358 } // namespace net |
OLD | NEW |