tor-browser

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

supportedLocalesOf-taint-Array.js (705B)


      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_2
      6 description: >
      7    Tests that the behavior of a List is not affected by adversarial
      8    changes to Array.prototype.
      9 author: Norbert Lindenberg
     10 includes: [testIntl.js]
     11 ---*/
     12 
     13 taintArray();
     14 
     15 testWithIntlConstructors(function (Constructor) {
     16    var defaultLocale = new Constructor().resolvedOptions().locale;
     17    var canonicalized = Constructor.supportedLocalesOf([defaultLocale, defaultLocale]);
     18    assert.sameValue(canonicalized.length > 1, false, "Canonicalization didn't remove duplicate language tags from locale list.");
     19 });
     20 
     21 reportCompare(0, 0);