v8/test/intl/displaynames/supported-locale.js
Frank Tang 3f270f34a1 [intl] Remove flag for Intl.DisplayNames
Intl.DisplayNames was shipped in m81 and we now can remove the flag.
https://www.chromestatus.com/features/4965112605573120


Bug: v8:8703
Change-Id: Ib65d787c1871aa1da38a22fdb9e369c680c7d2c9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2163820
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67382}
2020-04-25 02:14:01 +00:00

21 lines
731 B
JavaScript

// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
assertEquals(typeof Intl.DisplayNames.supportedLocalesOf, "function",
"Intl.DisplayNames.supportedLocalesOf should be a function");
var undef = Intl.DisplayNames.supportedLocalesOf();
assertEquals([], undef);
var empty = Intl.DisplayNames.supportedLocalesOf([]);
assertEquals([], empty);
var strLocale = Intl.DisplayNames.supportedLocalesOf('sr');
assertEquals('sr', strLocale[0]);
var multiLocale = ['sr-Thai-RS', 'de', 'zh-CN'];
assertEquals(multiLocale,
Intl.DisplayNames.supportedLocalesOf(multiLocale,
{localeMatcher: "lookup"}));