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 // Flags: --harmony-global |
| 6 |
| 7 function Test() { |
| 8 var globalObject = global; |
| 9 assertEquals(globalObject, global); |
| 10 assertEquals(globalObject, global.global); |
| 11 |
| 12 var thisObject = this; |
| 13 assertEquals(globalObject, thisObject); |
| 14 assertEquals(globalObject, thisObject.global); |
| 15 |
| 16 const desc = Object.getOwnPropertyDescriptor(globalObject, 'global'); |
| 17 assertPropertiesEqual({ |
| 18 value: globalObject, |
| 19 writable: true, |
| 20 enumerable: false, |
| 21 configurable: true |
| 22 }, desc); |
| 23 } |
| 24 Test(); |
OLD | NEW |