| OLD | NEW | 
|---|
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 // Flags: --harmony-reflect | 5 // Flags: --harmony-reflect | 
| 6 | 6 | 
| 7 // TODO(neis): Test with proxies. | 7 // TODO(neis): Test with proxies. | 
| 8 | 8 | 
| 9 | 9 | 
| 10 | 10 | 
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 479   for (let target of objects) { | 479   for (let target of objects) { | 
| 480     prepare(target); | 480     prepare(target); | 
| 481     if (target instanceof Int32Array) continue;  // issue v8:4460 | 481     if (target instanceof Int32Array) continue;  // issue v8:4460 | 
| 482     assertTrue(Reflect.isExtensible(target)); | 482     assertTrue(Reflect.isExtensible(target)); | 
| 483     Object.preventExtensions(target); | 483     Object.preventExtensions(target); | 
| 484     assertFalse(Reflect.isExtensible(target)); | 484     assertFalse(Reflect.isExtensible(target)); | 
| 485   } | 485   } | 
| 486 })(); | 486 })(); | 
| 487 | 487 | 
| 488 | 488 | 
| 489 |  | 
| 490 //////////////////////////////////////////////////////////////////////////////// |  | 
| 491 // Reflect.enumerate |  | 
| 492 |  | 
| 493 |  | 
| 494 (function testReflectEnumerateArity() { |  | 
| 495   assertEquals(1, Reflect.enumerate.length); |  | 
| 496 })(); |  | 
| 497 |  | 
| 498 |  | 
| 499 (function testReflectEnumerateOnNonObject() { |  | 
| 500   assertThrows(function() { Reflect.enumerate(); }, TypeError); |  | 
| 501   assertThrows(function() { Reflect.enumerate(42); }, TypeError); |  | 
| 502   assertThrows(function() { Reflect.enumerate(null); }, TypeError); |  | 
| 503 })(); |  | 
| 504 |  | 
| 505 |  | 
| 506 // See reflect-enumerate*.js for further tests. |  | 
| 507 |  | 
| 508 |  | 
| 509 |  | 
| 510 //////////////////////////////////////////////////////////////////////////////// | 489 //////////////////////////////////////////////////////////////////////////////// | 
| 511 // Reflect.getOwnPropertyDescriptor | 490 // Reflect.getOwnPropertyDescriptor | 
| 512 | 491 | 
| 513 | 492 | 
| 514 (function testReflectGetOwnPropertyDescriptorArity() { | 493 (function testReflectGetOwnPropertyDescriptorArity() { | 
| 515   assertEquals(2, Reflect.getOwnPropertyDescriptor.length); | 494   assertEquals(2, Reflect.getOwnPropertyDescriptor.length); | 
| 516 })(); | 495 })(); | 
| 517 | 496 | 
| 518 | 497 | 
| 519 (function testReflectGetOwnPropertyDescriptorOnNonObject() { | 498 (function testReflectGetOwnPropertyDescriptorOnNonObject() { | 
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 584   assertThrows(function() { Reflect.preventExtensions(); }, TypeError); | 563   assertThrows(function() { Reflect.preventExtensions(); }, TypeError); | 
| 585   assertThrows(function() { Reflect.preventExtensions(42); }, TypeError); | 564   assertThrows(function() { Reflect.preventExtensions(42); }, TypeError); | 
| 586   assertThrows(function() { Reflect.preventExtensions(null); }, TypeError); | 565   assertThrows(function() { Reflect.preventExtensions(null); }, TypeError); | 
| 587 })(); | 566 })(); | 
| 588 | 567 | 
| 589 | 568 | 
| 590 // See reflect-prevent-extensions.js for further tests. | 569 // See reflect-prevent-extensions.js for further tests. | 
| 591 | 570 | 
| 592 // TODO(neis): Need proxies to test the situation where | 571 // TODO(neis): Need proxies to test the situation where | 
| 593 // [[preventExtensions]] returns false. | 572 // [[preventExtensions]] returns false. | 
| OLD | NEW | 
|---|