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

Unified Diff: components/url_formatter/url_formatter_unittest.cc

Issue 2683793010: Block domain labels made of Cyrillic letters that look alike Latin (Closed)
Patch Set: check Cyrl-Latn alikes only for non-IDN tlds Created 3 years, 10 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
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 c0fe9509a6d4ac21a85ed744678e9468412c3155..8c5759da6b3e19d2ff0305d6aad5f6c9a2212fba 100644
--- a/components/url_formatter/url_formatter_unittest.cc
+++ b/components/url_formatter/url_formatter_unittest.cc
@@ -209,6 +209,14 @@ const IDNTestCase idn_cases[] = {
// U+30FB + Latin
{"xn--abc-os4b.jp", L"\x30fb" L"abc.jp", false},
+ // 'scope' written in Cyrillic in '.com' (non-IDN TLD)
+ {"xn--e1argc3h.com", L"\x0455\x0441\x043e\x0440\x0435.com", false},
+ // 'scope' in Cyrillic, but in Cyrillic TLD.
+ {"xn--e1argc3h.xn--p1ai", L"\x0455\x0441\x043e\x0440\x0435.\x0440\x0444",
+ true},
+ // 'museum' in Russian has characters that are not a Latin-look-alike.
+ {"xn--e1adhj9a.com", L"\x043c\x0443\x0437\x0435\x0439.com", true},
+
// Mixed digits: the first two will also fail mixed script test
// Latin + ASCII digit + Deva digit
{"xn--asc1deva-j0q.co.in", L"asc1deva\x0967.co.in", false},
« components/url_formatter/url_formatter.cc ('K') | « components/url_formatter/url_formatter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698