| // Copyright (C) 2016 Jordan Harband. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| description: Object.getOwnPropertyDescriptors on a proxy with duplicate ownKeys should work |
| esid: sec-object.getownpropertydescriptors |
| { enumerable: false, value: "A1", writable: true, configurable: true }, |
| { enumerable: true, value: "A2", writable: true, configurable: true } |
| var proxy = new Proxy({}, { |
| return ['DUPLICATE', 'DUPLICATE', 'DUPLICATE']; |
| getOwnPropertyDescriptor(t, name) { |
| log += 'getOwnPropertyDescriptor:' + name + '|'; |
| var result = Object.getOwnPropertyDescriptors(proxy); |
| assert.sameValue(result.hasOwnProperty('DUPLICATE'), true); |
| assert.sameValue(result.DUPLICATE, undefined); |
| assert.sameValue(log, 'ownKeys|getOwnPropertyDescriptor:DUPLICATE|getOwnPropertyDescriptor:DUPLICATE|getOwnPropertyDescriptor:DUPLICATE|'); |