v8/test/intl/date-format/resolved-options-unwrap.js
Frank Tang d34ffa6a38 [Intl] move DateTimeFormat.prototype.resolvedOptions to c++
Bug: v8:8066
Change-Id: I931de0472941fca8f68739a05fa38dee308d59f4
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng;luci.chromium.try:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1212467
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56227}
2018-09-26 00:57:09 +00:00

12 lines
507 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.
// Test the Intl.DateTimeFormat.prototype.resolvedOptions will properly handle
// 3. Let dtf be ? UnwrapDateTimeFormat(dtf).
var x = Object.create(Intl.DateTimeFormat.prototype);
x = Intl.DateTimeFormat.call(x, 'en');
var resolvedOptions = Intl.DateTimeFormat.prototype.resolvedOptions.call(x);
assertEquals(resolvedOptions.locale, 'en')