OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/url_formatter/url_formatter.h" | 5 #include "components/url_formatter/url_formatter.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 {"xn--weka801xo02a.com", L"\x30fc\x52d5\x753b\x30fc.com", false}, | 202 {"xn--weka801xo02a.com", L"\x30fc\x52d5\x753b\x30fc.com", false}, |
203 // Han + U+30FC + Han | 203 // Han + U+30FC + Han |
204 {"xn--wekz60nb2ay85atj0b.jp", L"\x65e5\x672c\x30fc\x91ce\x7403.jp", false}, | 204 {"xn--wekz60nb2ay85atj0b.jp", L"\x65e5\x672c\x30fc\x91ce\x7403.jp", false}, |
205 // Latin + U+30FC + Latin | 205 // Latin + U+30FC + Latin |
206 {"xn--abcdef-r64e.jp", L"abc\x30fc" L"def.jp", false}, | 206 {"xn--abcdef-r64e.jp", L"abc\x30fc" L"def.jp", false}, |
207 // Latin + U+30FB + Latin | 207 // Latin + U+30FB + Latin |
208 {"xn--abcdef-k64e.jp", L"abc\x30fb" L"def.jp", false}, | 208 {"xn--abcdef-k64e.jp", L"abc\x30fb" L"def.jp", false}, |
209 // U+30FB + Latin | 209 // U+30FB + Latin |
210 {"xn--abc-os4b.jp", L"\x30fb" L"abc.jp", false}, | 210 {"xn--abc-os4b.jp", L"\x30fb" L"abc.jp", false}, |
211 | 211 |
| 212 // 'scope' written in Cyrillic in '.com' (non-IDN TLD) |
| 213 {"xn--e1argc3h.com", L"\x0455\x0441\x043e\x0440\x0435.com", false}, |
| 214 // 'scope' in Cyrillic, but in Cyrillic TLD. |
| 215 {"xn--e1argc3h.xn--p1ai", L"\x0455\x0441\x043e\x0440\x0435.\x0440\x0444", |
| 216 true}, |
| 217 // 'museum' in Russian has characters that are not a Latin-look-alike. |
| 218 {"xn--e1adhj9a.com", L"\x043c\x0443\x0437\x0435\x0439.com", true}, |
| 219 |
212 // Mixed digits: the first two will also fail mixed script test | 220 // Mixed digits: the first two will also fail mixed script test |
213 // Latin + ASCII digit + Deva digit | 221 // Latin + ASCII digit + Deva digit |
214 {"xn--asc1deva-j0q.co.in", L"asc1deva\x0967.co.in", false}, | 222 {"xn--asc1deva-j0q.co.in", L"asc1deva\x0967.co.in", false}, |
215 // Latin + Deva digit + Beng digit | 223 // Latin + Deva digit + Beng digit |
216 {"xn--devabeng-f0qu3f.co.in", L"deva\x0967" L"beng\x09e7.co.in", false}, | 224 {"xn--devabeng-f0qu3f.co.in", L"deva\x0967" L"beng\x09e7.co.in", false}, |
217 // ASCII digit + Deva digit | 225 // ASCII digit + Deva digit |
218 {"xn--79-v5f.co.in", L"7\x09ea" L"9.co.in", false}, | 226 {"xn--79-v5f.co.in", L"7\x09ea" L"9.co.in", false}, |
219 // Deva digit + Beng digit | 227 // Deva digit + Beng digit |
220 {"xn--e4b0x.co.in", L"\x0967\x09e7.co.in", false}, | 228 {"xn--e4b0x.co.in", L"\x0967\x09e7.co.in", false}, |
221 // U+4E00 (CJK Ideograph One) is not a digit | 229 // U+4E00 (CJK Ideograph One) is not a digit |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 0, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos, 0, kNpos, kNpos, kNpos, kNpos, | 929 0, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos, 0, kNpos, kNpos, kNpos, kNpos, |
922 0, 1, 2, 3, 4, 5, 6, 7 | 930 0, 1, 2, 3, 4, 5, 6, 7 |
923 }; | 931 }; |
924 CheckAdjustedOffsets("http://user@foo.com/", kFormatUrlOmitAll, | 932 CheckAdjustedOffsets("http://user@foo.com/", kFormatUrlOmitAll, |
925 net::UnescapeRule::NORMAL, omit_all_offsets); | 933 net::UnescapeRule::NORMAL, omit_all_offsets); |
926 } | 934 } |
927 | 935 |
928 } // namespace | 936 } // namespace |
929 | 937 |
930 } // namespace url_formatter | 938 } // namespace url_formatter |
OLD | NEW |