9732200408
This is a partial reland of 048a3a3ecb
Original change's description:
> [Intl] Cleans up intl-relative-time-format flag
>
> Cleans up always=true intl-relative-time-format flag
> It shipped in m71 in Dec 2018.
>
> Bug: v8:8704
> Change-Id: I52d86aea9aedf201a216a1df0773a486fbee37b9
> Reviewed-on: https://chromium-review.googlesource.com/c/1417299
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58904}
Bug: v8:8704
Change-Id: Iac62a347eea7f85dd3fa4a3bbfb18091b80f9a5e
Reviewed-on: https://chromium-review.googlesource.com/c/1429224
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59081}
19 lines
730 B
JavaScript
19 lines
730 B
JavaScript
// Copyright 2018 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.RelativeTimeFormat.supportedLocalesOf, "function",
|
|
"Intl.RelativeTimeFormat.supportedLocalesOf should be a function");
|
|
|
|
var undef = Intl.RelativeTimeFormat.supportedLocalesOf();
|
|
assertEquals([], undef);
|
|
|
|
var empty = Intl.RelativeTimeFormat.supportedLocalesOf([]);
|
|
assertEquals([], empty);
|
|
|
|
var strLocale = Intl.RelativeTimeFormat.supportedLocalesOf('sr');
|
|
assertEquals('sr', strLocale[0]);
|
|
|
|
var multiLocale = ['sr-Thai-RS', 'de', 'zh-CN'];
|
|
assertEquals(multiLocale, Intl.RelativeTimeFormat.supportedLocalesOf(multiLocale));
|