v8/test/intl/regress-895942.js
Sathya Gunasekaran 8fd5fa2238 [Intl] Validate extension keys
- Fix ParseBCP47 to return just the extension. The second argument to
  substr function is actually the length, not the end position of the
  substring :')
- Remove extension keys that aren't part of the relevant extension keys
- Use 'ca' as an relevant extension key for DateTimeFormat
- Use the canonicalized locale tag after create the ICU locale is
  created, rather than the input locale tag.

Bug: chromium:895942, v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I189709714d847e684b04409b734a60ff04ed7dd2
Reviewed-on: https://chromium-review.googlesource.com/c/1291076
Reviewed-by: Frank Tang <ftang@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57274}
2018-11-06 12:11:50 +00:00

7 lines
261 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.
x = new Intl.DateTimeFormat("en-u-foo-x-u");
assertEquals('en', x.resolvedOptions().locale);