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

Unified Diff: components/url_formatter/url_formatter_unittest.cc

Issue 2613603002: url_formatter: Remove U+2010 from the displayable character set. (Closed)
Patch Set: Created 3 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/url_formatter/url_formatter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/url_formatter/url_formatter_unittest.cc
diff --git a/components/url_formatter/url_formatter_unittest.cc b/components/url_formatter/url_formatter_unittest.cc
index 72613345743cf1cc654bd319a75d834e4e5d243c..c0fe9509a6d4ac21a85ed744678e9468412c3155 100644
--- a/components/url_formatter/url_formatter_unittest.cc
+++ b/components/url_formatter/url_formatter_unittest.cc
@@ -290,6 +290,34 @@ const IDNTestCase idn_cases[] = {
// Hebrew Gershayim with Arabic is disallowed.
{"xn--5eb7h.eg", L"\x0628\x05f4.eg", false},
+ // Hyphens (http://unicode.org/cldr/utility/confusables.jsp?a=-)
+ // Hyphen-Minus (the only hyphen allowed)
+ // abc-def
+ {"abc-def.com", L"abc-def.com", true},
+ // Modifier Letter Minus Sign
+ {"xn--abcdef-5od.com", L"abc\x02d7" L"def.com", false},
+ // Hyphen
+ {"xn--abcdef-dg0c.com", L"abc\x2010" L"def.com", false},
+ // Non-Breaking Hyphen
+ // This is actually an invalid IDNA domain (U+2011 normalizes to U+2010), but
+ // it is included to ensure that we do not inadvertently allow this character
+ // to be displayed as Unicode.
+ {"xn--abcdef-kg0c.com", L"abc\x2011" L"def.com", false},
+ // Figure Dash
+ {"xn--abcdef-rg0c.com", L"abc\x2012" L"def.com", false},
+ // En Dash
+ {"xn--abcdef-yg0c.com", L"abc\x2013" L"def.com", false},
+ // Hyphen Bullet
+ {"xn--abcdef-kq0c.com", L"abc\x2043" L"def.com", false},
+ // Minus Sign
+ {"xn--abcdef-5d3c.com", L"abc\x2212" L"def.com", false},
+ // Heavy Minus Sign
+ {"xn--abcdef-kg1d.com", L"abc\x2796" L"def.com", false},
+ // Coptic Capital Letter Dialect-P Ni
+ {"xn--abcdef-yy8d.com", L"abc\x2cba" L"def.com", false},
+ // Small Em Dash
+ {"xn--abcdef-5g0c.com", L"abc\xfe58" L"def.com", false},
+
// Custom dangerous patterns
// Two Katakana-Hiragana combining mark in a row
{"google.xn--com-oh4ba.evil.jp", L"google.com\x309a\x309a.evil.jp", false},
« no previous file with comments | « components/url_formatter/url_formatter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698