Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Side by Side Diff: test/intl/general/getCanonicalLocales.js

Issue 2239523002: Expose getCanonicalLocales() for Intl object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: check if returned object is an array Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-i18n.cc ('k') | test/test262/test262.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 var locales = ['en-US', 'fr'];
6 var result = Intl.getCanonicalLocales(locales);
7 var len = result.length
8
9 // TODO(jshin): Remove the following when
10 // https://github.com/tc39/test262/issues/745 is resolved and
11 // test262 in v8 is updated.
12
13 assertEquals(Object.getPrototypeOf(result), Array.prototype);
14 assertEquals(result.constructor, Array);
15
16 for (var key in result) {
17 var desc = Object.getOwnPropertyDescriptor(result, key);
18 assertTrue(desc.writable);
19 assertTrue(desc.configurable);
20 assertTrue(desc.enumerable);
21 }
22
23 var desc = Object.getOwnPropertyDescriptor(result, 'length');
24 assertTrue(desc.writable);
25 assertEquals(result.push('de'), desc.value + 1);
OLDNEW
« no previous file with comments | « src/runtime/runtime-i18n.cc ('k') | test/test262/test262.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698