| canonicalized-tags.js |
---
esid: sec-intl.getcanonicallocales
description: >
Call Intl.getCanonicalLocales function with valid language tags.
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
2. Return CreateArrayFromList(ll).
9.2.1 CanonicalizeLocaleList (locales)
...
7. Repeat, while k < len
a. Let Pk be ToString(k).
b. Let kPresent be ? HasProperty(O, Pk).
c. If kPresent is true, then
i. Let kValue be ? Get(O, Pk).
...
iii. Let tag be ? ToString(kValue).
...
v. Let canonicalizedTag be CanonicalizeLanguageTag(tag).
vi. If canonicalizedTag is not an element of seen, append canonicalizedTag as the last element of seen.
...
includes: [testIntl.js]
--- |
2221 |
- |
| canonicalized-unicode-ext-seq.js |
---
esid: sec-intl.getcanonicallocales
description: >
Implementations are allowed to canonicalize extension subtag sequences.
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
2. Return CreateArrayFromList(ll).
9.2.1 CanonicalizeLocaleList (locales)
...
7. Repeat, while k < len
...
c. If kPresent is true, then
...
v. Let canonicalizedTag be CanonicalizeLanguageTag(tag).
...
6.2.3 CanonicalizeLanguageTag (locale)
The specifications for extensions to BCP 47 language tags, such as
RFC 6067, may include canonicalization rules for the extension subtag
sequences they define that go beyond the canonicalization rules of
RFC 5646 section 4.5. Implementations are allowed, but not required,
to apply these additional rules.
--- |
1364 |
- |
| descriptor.js |
---
esid: sec-intl.getcanonicallocales
description: >
Intl.getCanonicalLocales property attributes.
info: |
8.2.1 Intl.getCanonicalLocales (locales)
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in
Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,
[[Configurable]]: true } unless otherwise specified.
includes: [propertyHelper.js]
--- |
718 |
- |
| duplicates.js |
---
esid: sec-intl.getcanonicallocales
description: Tests the getCanonicalLocales function for duplicate locales scenario.
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
2. Return CreateArrayFromList(ll).
includes: [compareArray.js]
--- |
655 |
- |
| elements-not-reordered.js |
---
esid: sec-intl.getcanonicallocales
description: >
Language tags are not reordered.
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
2. Return CreateArrayFromList(ll).
9.2.1 CanonicalizeLocaleList (locales)
...
7. Repeat, while k < len
...
c. If kPresent is true, then
...
vi. If canonicalizedTag is not an element of seen, append canonicalizedTag as the last element of seen.
...
--- |
831 |
- |
| error-cases.js |
---
esid: sec-intl.getcanonicallocales
description: Tests the getCanonicalLocales function for error tags.
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
2. Return CreateArrayFromList(ll).
includes: [compareArray.js]
features: [Symbol]
--- |
907 |
- |
| get-locale.js |
---
esid: sec-intl.getcanonicallocales
description: Test Intl.getCanonicalLocales for step 7.c.i.
info: |
9.2.1 CanonicalizeLocaleList (locales)
7. Repeat, while k < len.
c. If kPresent is true, then
i. Let kValue be ? Get(O, Pk).
--- |
609 |
- |
| getCanonicalLocales.js |
---
esid: sec-intl.getcanonicallocales
description: Property type and descriptor.
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
2. Return CreateArrayFromList(ll).
includes: [propertyHelper.js]
--- |
655 |
- |
| has-property.js |
---
esid: sec-intl.getcanonicallocales
description: Test Intl.getCanonicalLocales.name for step 7.b.
info: |
9.2.1 CanonicalizeLocaleList (locales)
7. Repeat, while k < len.
b. Let kPresent be HasProperty(O, Pk).
features: [Proxy]
--- |
648 |
- |
| invalid-tags.js |
---
esid: sec-intl.getcanonicallocales
description: >
Throws a RangeError if the language tag is invalid.
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
...
9.2.1 CanonicalizeLocaleList (locales)
...
7. Repeat, while k < len
...
c. If kPresent is true, then
...
iv. If IsStructurallyValidLanguageTag(tag) is false, throw a RangeError exception.
...
includes: [testIntl.js]
--- |
2400 |
- |
| length.js |
---
esid: sec-intl.getcanonicallocales
description: Intl.getCanonicalLocales.length.
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
2. Return CreateArrayFromList(ll).
includes: [propertyHelper.js]
--- |
614 |
- |
| locales-is-not-a-string.js |
---
esid: sec-intl.getcanonicallocales
description: Tests for scenario where locales is not a string
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
2. Return CreateArrayFromList(ll).
includes: [compareArray.js]
features: [Symbol]
--- |
823 |
- |
| main.js |
---
esid: sec-intl.getcanonicallocales
description: Tests for existance and behavior of Intl.getCanonicalLocales
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
2. Return CreateArrayFromList(ll).
includes: [compareArray.js]
--- |
796 |
- |
| name.js |
---
esid: sec-intl.getcanonicallocales
description: Intl.getCanonicalLocales.name value and descriptor.
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
2. Return CreateArrayFromList(ll).
includes: [propertyHelper.js]
--- |
723 |
- |
| overriden-arg-length.js |
---
esid: sec-intl.getcanonicallocales
description: Test Intl.getCanonicalLocales for step 5.
info: |
9.2.1 CanonicalizeLocaleList (locales)
5. Let len be ? ToLength(? Get(O, "length")).
includes: [compareArray.js]
features: [Symbol]
--- |
2157 |
- |
| overriden-push.js |
---
esid: sec-intl.getcanonicallocales
description: Tests the getCanonicalLocales function for overridden Array.push().
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
2. Return CreateArrayFromList(ll).
includes: [compareArray.js]
--- |
603 |
- |
| preferred-grandfathered.js |
---
esid: sec-intl.getcanonicallocales
description: >
Call Intl.getCanonicalLocales function with grandfathered language tags.
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
2. Return CreateArrayFromList(ll).
9.2.1 CanonicalizeLocaleList (locales)
...
7. Repeat, while k < len
...
c. If kPresent is true, then
...
v. Let canonicalizedTag be CanonicalizeLanguageTag(tag).
...
6.2.3 CanonicalizeLanguageTag ( locale )
The CanonicalizeLanguageTag abstract operation returns the canonical and case-regularized
form of the locale argument (which must be a String value that is a structurally valid
BCP 47 language tag as verified by the IsStructurallyValidLanguageTag abstract operation).
A conforming implementation shall take the steps specified in RFC 5646 section 4.5, or
successor, to bring the language tag into canonical form, and to regularize the case of
the subtags. Furthermore, a conforming implementation shall not take the steps to bring
a language tag into "extlang form", nor shall it reorder variant subtags.
The specifications for extensions to BCP 47 language tags, such as RFC 6067, may include
canonicalization rules for the extension subtag sequences they define that go beyond the
canonicalization rules of RFC 5646 section 4.5. Implementations are allowed, but not
required, to apply these additional rules.
includes: [testIntl.js]
--- |
3001 |
- |
| preferred-variant.js |
---
esid: sec-intl.getcanonicallocales
description: >
Call Intl.getCanonicalLocales function with grandfathered language tags.
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
2. Return CreateArrayFromList(ll).
9.2.1 CanonicalizeLocaleList (locales)
...
7. Repeat, while k < len
...
c. If kPresent is true, then
...
v. Let canonicalizedTag be CanonicalizeLanguageTag(tag).
...
6.2.3 CanonicalizeLanguageTag ( locale )
The CanonicalizeLanguageTag abstract operation returns the canonical and case-regularized
form of the locale argument (which must be a String value that is a structurally valid
BCP 47 language tag as verified by the IsStructurallyValidLanguageTag abstract operation).
A conforming implementation shall take the steps specified in RFC 5646 section 4.5, or
successor, to bring the language tag into canonical form, and to regularize the case of
the subtags. Furthermore, a conforming implementation shall not take the steps to bring
a language tag into "extlang form", nor shall it reorder variant subtags.
The specifications for extensions to BCP 47 language tags, such as RFC 6067, may include
canonicalization rules for the extension subtag sequences they define that go beyond the
canonicalization rules of RFC 5646 section 4.5. Implementations are allowed, but not
required, to apply these additional rules.
includes: [testIntl.js]
--- |
2442 |
- |
| returned-object-is-an-array.js |
---
esid: sec-intl.getcanonicallocales
description: Tests that the value returned by getCanonicalLocales is an Array.
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
2. Return CreateArrayFromList(ll).
--- |
855 |
- |
| returned-object-is-mutable.js |
---
esid: sec-intl.getcanonicallocales
description: >
Tests that the value returned by getCanonicalLocales is a mutable array.
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
2. Return CreateArrayFromList(ll).
includes: [propertyHelper.js]
--- |
1083 |
- |
| to-string.js |
---
esid: sec-intl.getcanonicallocales
description: Test Intl.getCanonicalLocales.name for step 7.c.iii
info: |
9.2.1 CanonicalizeLocaleList (locales)
7. Repeat, while k < len.
c. If kPresent is true, then
iii. Let tag be ? ToString(kValue).
includes: [compareArray.js]
--- |
613 |
- |
| weird-cases.js |
---
esid: sec-intl.getcanonicallocales
description: Tests the getCanonicalLocales function for weird tags.
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
2. Return CreateArrayFromList(ll).
includes: [compareArray.js]
--- |
651 |
- |