OLD | NEW |
(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); |
OLD | NEW |