tor-browser

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

supportedLocalesOf-duplicate-elements-removed.js (679B)


      1 // Copyright 2012 Mozilla Corporation. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 es5id: 9.2.1_8_c_vi
      6 description: >
      7    Tests that canonicalization of locale lists removes duplicate
      8    language tags.
      9 author: Norbert Lindenberg
     10 includes: [testIntl.js]
     11 ---*/
     12 
     13 testWithIntlConstructors(function (Constructor) {
     14    var defaultLocale = new Constructor().resolvedOptions().locale;
     15    var canonicalized = Constructor.supportedLocalesOf([defaultLocale, defaultLocale]);
     16    assert.sameValue(canonicalized.length > 1, false, "Canonicalization didn't remove duplicate language tags from locale list.");
     17 });
     18 
     19 reportCompare(0, 0);