tor-browser

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

to-string.js (634B)


      1 // Copyright 2016 Mozilla Corporation. All rights reserved.
      2 // This code is governed by the license found in the LICENSE file.
      3 
      4 /*---
      5 esid: sec-intl.getcanonicallocales
      6 description: Test Intl.getCanonicalLocales.name for step 7.c.iii 
      7 info: |
      8  9.2.1 CanonicalizeLocaleList (locales)
      9    7. Repeat, while k < len.
     10      c. If kPresent is true, then
     11        iii. Let tag be ? ToString(kValue).
     12 includes: [compareArray.js]
     13 ---*/
     14 
     15 var locales = {
     16  '0': { toString: function() { locales[1] = 'pt-BR'; return 'en-US'; }},
     17  length: 2
     18 };
     19 
     20 assert.compareArray(Intl.getCanonicalLocales(locales), [ "en-US", "pt-BR" ]);
     21 
     22 reportCompare(0, 0);