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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 {"xn--95e5de3ds.cn", L"\x1823\x1837\x1804\x1833\x1824.cn", false}, | 118 {"xn--95e5de3ds.cn", L"\x1823\x1837\x1804\x1833\x1824.cn", false}, |
119 // Miao/Pollad | 119 // Miao/Pollad |
120 {"xn--2u0fpf0a.cn", L"\U00016f04\U00016f62\U00016f59.cn", true}, | 120 {"xn--2u0fpf0a.cn", L"\U00016f04\U00016f62\U00016f59.cn", true}, |
121 | 121 |
122 // Script mixing tests | 122 // Script mixing tests |
123 // The following script combinations are allowed. | 123 // The following script combinations are allowed. |
124 // MODERATELY_RESTRICTIVE with Latin limited to ASCII-Latin. | 124 // MODERATELY_RESTRICTIVE with Latin limited to ASCII-Latin. |
125 // ASCII-Latin + Japn (Kana + Han) | 125 // ASCII-Latin + Japn (Kana + Han) |
126 // ASCII-Latin + Kore (Hangul + Han) | 126 // ASCII-Latin + Kore (Hangul + Han) |
127 // ASCII-Latin + Han + Bopomofo | 127 // ASCII-Latin + Han + Bopomofo |
128 // ASCII-Latin + any allowed script other than Cyrillic, Greek and Cherokee | 128 // ASCII-Latin + any allowed script other than Cyrillic, Greek, Cherokee |
| 129 // and Unified Canadian Syllabary |
129 // "payp<alpha>l.com" | 130 // "payp<alpha>l.com" |
130 {"www.xn--paypl-g9d.com", L"payp\x03b1l.com", false}, | 131 {"www.xn--paypl-g9d.com", L"payp\x03b1l.com", false}, |
131 // google.gr with Greek omicron and epsilon | 132 // google.gr with Greek omicron and epsilon |
132 {"xn--ggl-6xc1ca.gr", L"g\x03bf\x03bfgl\x03b5.gr", false}, | 133 {"xn--ggl-6xc1ca.gr", L"g\x03bf\x03bfgl\x03b5.gr", false}, |
133 // google.ru with Cyrillic o | 134 // google.ru with Cyrillic o |
134 {"xn--ggl-tdd6ba.ru", L"g\x043e\x043egl\x0435.ru", false}, | 135 {"xn--ggl-tdd6ba.ru", L"g\x043e\x043egl\x0435.ru", false}, |
135 // h<e with acute>llo<China in Han>.cn | 136 // h<e with acute>llo<China in Han>.cn |
136 {"xn--hllo-bpa7979ih5m.cn", L"h\x00e9llo\x4e2d\x56fd.cn", false}, | 137 {"xn--hllo-bpa7979ih5m.cn", L"h\x00e9llo\x4e2d\x56fd.cn", false}, |
137 // <Greek rho><Cyrillic a><Cyrillic u>.ru | 138 // <Greek rho><Cyrillic a><Cyrillic u>.ru |
138 {"xn--2xa6t2b.ru", L"\x03c1\x0430\x0443.ru", false}, | 139 {"xn--2xa6t2b.ru", L"\x03c1\x0430\x0443.ru", false}, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 {"xn--ab-3ofh8fqbj6h.in", L"ab\x0939\x093f\x0928\x094d\x0926\x0940.in", true}, | 173 {"xn--ab-3ofh8fqbj6h.in", L"ab\x0939\x093f\x0928\x094d\x0926\x0940.in", true}, |
173 // Thai + Latin | 174 // Thai + Latin |
174 {"xn--ab-jsi9al4bxdb6n.th", | 175 {"xn--ab-jsi9al4bxdb6n.th", |
175 L"ab\x0e20\x0e32\x0e29\x0e32\x0e44\x0e17\x0e22.th", true}, | 176 L"ab\x0e20\x0e32\x0e29\x0e32\x0e44\x0e17\x0e22.th", true}, |
176 // <vitamin in Katakana>b1.com | 177 // <vitamin in Katakana>b1.com |
177 {"xn--b1-xi4a7cvc9f.com", L"\x30d3\x30bf\x30df\x30f3" L"b1.com", true}, | 178 {"xn--b1-xi4a7cvc9f.com", L"\x30d3\x30bf\x30df\x30f3" L"b1.com", true}, |
178 // Devanagari + Han | 179 // Devanagari + Han |
179 {"xn--t2bes3ds6749n.com", L"\x0930\x094b\x0932\x0947\x76e7\x0938.com", false}, | 180 {"xn--t2bes3ds6749n.com", L"\x0930\x094b\x0932\x0947\x76e7\x0938.com", false}, |
180 // Devanagari + Bengali | 181 // Devanagari + Bengali |
181 {"xn--11b0x.in", L"\x0915\x0995.in", false}, | 182 {"xn--11b0x.in", L"\x0915\x0995.in", false}, |
| 183 // Canadian Syllabary + Latin |
| 184 {"xn--ab-lym.com", L"ab\x14BF.com", false}, |
| 185 {"xn--ab1-p6q.com", L"ab1\x14BF.com", false}, |
| 186 {"xn--1ab-m6qd.com", L"\x14BF" L"1ab.com", false}, |
| 187 {"xn--ab-jymc.com", L"\x14BF" L"ab.com", false}, |
182 | 188 |
183 // Invisibility check | 189 // Invisibility check |
184 // Thai tone mark malek(U+0E48) repeated | 190 // Thai tone mark malek(U+0E48) repeated |
185 {"xn--03c0b3ca.th", L"\x0e23\x0e35\x0e48\x0e48.th", false}, | 191 {"xn--03c0b3ca.th", L"\x0e23\x0e35\x0e48\x0e48.th", false}, |
186 // Accute accent repeated | 192 // Accute accent repeated |
187 {"xn--a-xbba.com", L"a\x0301\x0301.com", false}, | 193 {"xn--a-xbba.com", L"a\x0301\x0301.com", false}, |
188 // 'a' with acuted accent + another acute accent | 194 // 'a' with acuted accent + another acute accent |
189 {"xn--1ca20i.com", L"\x00e1\x0301.com", false}, | 195 {"xn--1ca20i.com", L"\x00e1\x0301.com", false}, |
190 // Combining mark at the beginning | 196 // Combining mark at the beginning |
191 {"xn--abc-fdc.jp", L"\x0300" L"abc.jp", false}, | 197 {"xn--abc-fdc.jp", L"\x0300" L"abc.jp", false}, |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 0, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos, 0, kNpos, kNpos, kNpos, kNpos, | 993 0, kNpos, kNpos, kNpos, kNpos, kNpos, kNpos, 0, kNpos, kNpos, kNpos, kNpos, |
988 0, 1, 2, 3, 4, 5, 6, 7 | 994 0, 1, 2, 3, 4, 5, 6, 7 |
989 }; | 995 }; |
990 CheckAdjustedOffsets("http://user@foo.com/", kFormatUrlOmitAll, | 996 CheckAdjustedOffsets("http://user@foo.com/", kFormatUrlOmitAll, |
991 net::UnescapeRule::NORMAL, omit_all_offsets); | 997 net::UnescapeRule::NORMAL, omit_all_offsets); |
992 } | 998 } |
993 | 999 |
994 } // namespace | 1000 } // namespace |
995 | 1001 |
996 } // namespace url_formatter | 1002 } // namespace url_formatter |
OLD | NEW |