[Intl] Add regression test for -u-tz- of Intl.DateTimeFormat
The fix need to be cherrypick from ICU. Fix in https://github.com/unicode-org/icu/pull/286 Adds regression test for 8469. Bug: v8:8469 Change-Id: If173058dd1113782fcf2ff5a55f962721f46aba5 Reviewed-on: https://chromium-review.googlesource.com/c/1340733 Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/master@{#58032}
This commit is contained in:
parent
216fb64816
commit
7866cb2687
@ -29,6 +29,9 @@
|
||||
[ALWAYS, {
|
||||
# TODO(jochen): The following test is flaky.
|
||||
'overrides/caching': [PASS, FAIL],
|
||||
|
||||
# https://crbug.com/v8/8469
|
||||
'regress-8469': [FAIL],
|
||||
}], # ALWAYS
|
||||
|
||||
['variant == no_wasm_traps', {
|
||||
|
87
test/intl/regress-8469.js
Normal file
87
test/intl/regress-8469.js
Normal file
@ -0,0 +1,87 @@
|
||||
// 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.
|
||||
|
||||
// The following tz are NOT impacted by v8:8469
|
||||
var some_tz_list = [
|
||||
"ciabj",
|
||||
"ghacc",
|
||||
];
|
||||
|
||||
// The following tz ARE impacted by v8:8469
|
||||
var problem_tz_list = [
|
||||
"etadd",
|
||||
"tzdar",
|
||||
"eheai",
|
||||
"sttms",
|
||||
"arirj",
|
||||
"arrgl",
|
||||
"aruaq",
|
||||
"arluq",
|
||||
"mxpvr",
|
||||
"brbvb",
|
||||
"arbue",
|
||||
"caycb",
|
||||
"brcgr",
|
||||
"cayzs",
|
||||
"crsjo",
|
||||
"caydq",
|
||||
"svsal",
|
||||
"cafne",
|
||||
"caglb",
|
||||
"cagoo",
|
||||
"tcgdt",
|
||||
"ustel",
|
||||
"bolpb",
|
||||
"uslax",
|
||||
"sxphi",
|
||||
"mxmex",
|
||||
"usnyc",
|
||||
"usxul",
|
||||
"usndcnt",
|
||||
"usndnsl",
|
||||
"ttpos",
|
||||
"brpvh",
|
||||
"prsju",
|
||||
"clpuq",
|
||||
"caffs",
|
||||
"cayek",
|
||||
"brrbr",
|
||||
"mxstis",
|
||||
"dosdq",
|
||||
"brsao",
|
||||
"gpsbh",
|
||||
"casjf",
|
||||
"knbas",
|
||||
"lccas",
|
||||
"vistt",
|
||||
"vcsvd",
|
||||
"cayyn",
|
||||
"cathu",
|
||||
"hkhkg",
|
||||
"mykul",
|
||||
"khpnh",
|
||||
"cvrai",
|
||||
"gsgrv",
|
||||
"shshn",
|
||||
"aubhq",
|
||||
"auldh",
|
||||
"imdgs",
|
||||
"smsai",
|
||||
"asppg",
|
||||
"pgpom",
|
||||
];
|
||||
|
||||
let expectedTimeZone = (new Intl.DateTimeFormat("en"))
|
||||
.resolvedOptions().timeZone;
|
||||
|
||||
function testTz(tz) {
|
||||
print(tz);
|
||||
let timeZone = (new Intl.DateTimeFormat("en-u-tz-" + tz))
|
||||
.resolvedOptions().timeZone;
|
||||
assertEquals(expectedTimeZone, timeZone);
|
||||
}
|
||||
|
||||
// first test soem tz not impacted by v8:8469 to ensure testTz is correct.
|
||||
for (var tz of some_tz_list) testTz(tz);
|
||||
for (var tz of problem_tz_list) testTz(tz);
|
Loading…
Reference in New Issue
Block a user