OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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-object-literals | |
6 | |
7 | 5 |
8 (function TestBasics() { | 6 (function TestBasics() { |
9 var x = 1; | 7 var x = 1; |
10 var object = {x}; | 8 var object = {x}; |
11 assertEquals(1, object.x); | 9 assertEquals(1, object.x); |
12 })(); | 10 })(); |
13 | 11 |
14 | 12 |
15 (function TestDescriptor() { | 13 (function TestDescriptor() { |
16 var x = 1; | 14 var x = 1; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 (function TestProtoName2() { | 62 (function TestProtoName2() { |
65 var __proto__ = 1; | 63 var __proto__ = 1; |
66 var p = {}; | 64 var p = {}; |
67 var object = { | 65 var object = { |
68 __proto__: p, | 66 __proto__: p, |
69 __proto__, | 67 __proto__, |
70 }; | 68 }; |
71 assertEquals(p, Object.getPrototypeOf(object)); | 69 assertEquals(p, Object.getPrototypeOf(object)); |
72 assertEquals(1, object.__proto__); | 70 assertEquals(1, object.__proto__); |
73 })(); | 71 })(); |
OLD | NEW |