v8/test/intl/general
Jungshik Shin f24b575d6c Fix canonicalization of grandfathered tags
ICU maps a few grandfathered tags to made-up values even when there
is no preferred value entry in the IANA language tag registry. [1]

1. Check for grandfathered tags without preferred value upfront
   and return them as they're.
2. Lowercase the input before structural validity check to simplify
   check for grandfathered tag without preferred value as well
   as regexps used in the structural validity check.

intl/general/grandfathered_tags_without_preferred_value is added and
intl/general/language_tags_with_preferred_values is changed to check
for case-insensitive matching of grandfathered tags.

[1] https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry

Bug: v8:7669
Test: test262/intl402/Intl/getCanonicalLocales/preferred-grandfathered
Test: intl/general/grandfathered_tags_without_preferred_value
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ie0520de8712928300fd71fe152909789483ec256
Reviewed-on: https://chromium-review.googlesource.com/1156529
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54829}
2018-07-31 23:49:45 +00:00
..
case-mapping.js Fix common misspellings 2017-08-02 09:35:28 +00:00
constructor.js [intl] Add new semantics + compat fallback to Intl constructor 2016-12-23 14:32:16 +00:00
empty-handle.js Import intl test suite from v8-i18n project 2013-07-10 10:49:04 +00:00
getCanonicalLocales.js [Intl] Add tests for duplicate subtag detection. 2018-07-27 18:10:16 +00:00
grandfathered_tags_without_preferred_value.js Fix canonicalization of grandfathered tags 2018-07-31 23:49:45 +00:00
invalid-locale.js Correct the misuse of uloc_{to,from}LanguageTag 2017-10-12 06:33:35 +00:00
language_tags_with_preferred_values.js Fix canonicalization of grandfathered tags 2018-07-31 23:49:45 +00:00
mapped-locale.js Import intl test suite from v8-i18n project 2013-07-10 10:49:04 +00:00
smp-identifier.js Allow identifier code points from supplementary multilingual planes. 2014-10-10 07:13:46 +00:00
supported-locales-of.js Add more testing of SupportedLocalesOf() 2018-06-11 23:08:22 +00:00