tor-browser

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

getCanonicalLocales-with-duplicates.js (611B)


      1 // |reftest| skip-if(!this.hasOwnProperty("Intl"))
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 // Tests the getCanonicalLocales function for duplicate locales scenario.
      7 
      8 assertEqArray(Intl.getCanonicalLocales(['ab-cd', 'ff', 'de-rt', 'ab-Cd']),
      9              ['ab-CD', 'ff', 'de-RT']);
     10 
     11 var locales = Intl.getCanonicalLocales(["en-US", "en-US"]);
     12 assertEqArray(locales, ['en-US']);
     13 
     14 if (typeof reportCompare === 'function')
     15    reportCompare(0, 0);