tor-browser

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

locale-fallback-handling.js (886B)


      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 // In locales that don't have a relative-date/time formatter -- and presently
      7 // "ak" is such a locale -- behavior is expected to fall back to the root-locale
      8 // formatter.  This test verifies such fallback works as long as "ak" satisfies
      9 // these properties; "ak" may safely be changed to a different locale if that
     10 // ever changes.  See bug 1504656.
     11 //
     12 // "ak" has relative-date/time formatter data as of ICU 76 / CLDR 46. Switch to
     13 // "haw", which doesn't have that data.
     14 assertEq(new Intl.RelativeTimeFormat("haw").format(1, "second"),
     15         "+1 s");
     16 
     17 if (typeof reportCompare === "function")
     18  reportCompare(0, 0, 'ok');