tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

locales-invalid.js (781B)


      1 // Copyright 2018 Igalia, S.L. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: sec-Intl.Segmenter.supportedLocalesOf
      6 description: Checks error cases for the locales argument to the supportedLocalesOf function.
      7 info: |
      8    Intl.Segmenter.supportedLocalesOf ( locales [, options ])
      9 
     10    2. Let requestedLocales be CanonicalizeLocaleList(locales).
     11 includes: [testIntl.js]
     12 features: [Intl.Segmenter]
     13 ---*/
     14 
     15 assert.sameValue(typeof Intl.Segmenter.supportedLocalesOf, "function",
     16                 "Should support Intl.Segmenter.supportedLocalesOf.");
     17 
     18 for (const [locales, expectedError] of getInvalidLocaleArguments()) {
     19    assert.throws(expectedError, () => Intl.Segmenter.supportedLocalesOf(locales));
     20 }
     21 
     22 reportCompare(0, 0);