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

Side by Side Diff: net/base/net_util_unittest.cc

Issue 1056383002: Refresh Public Suffix List to the latest version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test Created 5 years, 8 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 | « no previous file | net/base/registry_controlled_domains/effective_tld_names.dat » ('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/base/net_util.h" 5 #include "net/base/net_util.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <ostream> 9 #include <ostream>
10 10
(...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1525 { false, "::192.9.5.5" }, 1525 { false, "::192.9.5.5" },
1526 { false, "FEED::BEEF" }, 1526 { false, "FEED::BEEF" },
1527 { false, "FEC0:ba98:7654:3210:FEDC:BA98:7654:3210" }, 1527 { false, "FEC0:ba98:7654:3210:FEDC:BA98:7654:3210" },
1528 // 'internal'/non-IANA assigned domains. 1528 // 'internal'/non-IANA assigned domains.
1529 { false, "intranet" }, 1529 { false, "intranet" },
1530 { false, "intranet." }, 1530 { false, "intranet." },
1531 { false, "intranet.example" }, 1531 { false, "intranet.example" },
1532 { false, "host.intranet.example" }, 1532 { false, "host.intranet.example" },
1533 // gTLDs under discussion, but not yet assigned. 1533 // gTLDs under discussion, but not yet assigned.
1534 { false, "intranet.corp" }, 1534 { false, "intranet.corp" },
1535 { false, "example.tech" },
1536 { false, "intranet.internal" }, 1535 { false, "intranet.internal" },
1537 // Invalid host names are treated as unique - but expected to be 1536 // Invalid host names are treated as unique - but expected to be
1538 // filtered out before then. 1537 // filtered out before then.
1539 { true, "junk)(£)$*!@~#" }, 1538 { true, "junk)(£)$*!@~#" },
1540 { true, "w$w.example.com" }, 1539 { true, "w$w.example.com" },
1541 { true, "nocolonsallowed:example" }, 1540 { true, "nocolonsallowed:example" },
1542 { true, "[::4.5.6.9]" }, 1541 { true, "[::4.5.6.9]" },
1543 }; 1542 };
1544 1543
1545 class NetUtilNonUniqueNameTest 1544 class NetUtilNonUniqueNameTest
(...skipping 13 matching lines...) Expand all
1559 TEST_P(NetUtilNonUniqueNameTest, IsHostnameNonUnique) { 1558 TEST_P(NetUtilNonUniqueNameTest, IsHostnameNonUnique) {
1560 const NonUniqueNameTestData& test_data = GetParam(); 1559 const NonUniqueNameTestData& test_data = GetParam();
1561 1560
1562 EXPECT_EQ(test_data.is_unique, IsUnique(test_data.hostname)); 1561 EXPECT_EQ(test_data.is_unique, IsUnique(test_data.hostname));
1563 } 1562 }
1564 1563
1565 INSTANTIATE_TEST_CASE_P(, NetUtilNonUniqueNameTest, 1564 INSTANTIATE_TEST_CASE_P(, NetUtilNonUniqueNameTest,
1566 testing::ValuesIn(kNonUniqueNameTestData)); 1565 testing::ValuesIn(kNonUniqueNameTestData));
1567 1566
1568 } // namespace net 1567 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/base/registry_controlled_domains/effective_tld_names.dat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698