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

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: return array is mutable 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
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 // Individual elements are mutable.
13 for (var key in result) {
14 var desc = Object.getOwnPropertyDescriptor(result, key);
15 assertTrue(desc.writable);
16 assertTrue(desc.configurable);
17 assertTrue(desc.enumerable);
18 }
19
20 var desc = Object.getOwnPropertyDescriptor(result, 'length');
21 assertTrue(desc.writable);
22 assertEquals(result.push('de'), desc.value + 1);
OLDNEW
« src/js/i18n.js ('K') | « 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