blob: 917ad1cf6dc4c8b260afac324978da41d4d7d28b [file] [log] [blame]
keith_miller@apple.combcc77f22016-07-15 06:03:25 +00001// Copyright (c) 2012 Ecma International. All rights reserved.
2// This code is governed by the BSD license found in the LICENSE file.
3
4/*---
5es5id: 15.2.3.14-5-2
6description: >
7 Object.keys - own enumerable accessor property of 'O' is defined
8 in returned array
9---*/
10
11 var obj = { };
12
13 Object.defineProperty(obj, "prop", {
14 get: function () {
15 return 1003;
16 },
17 enumerable: true,
18 configurable: true
19 });
20
21 var arr = Object.keys(obj);
22
23assert(arr.hasOwnProperty(0), 'arr.hasOwnProperty(0) !== true');
24assert.sameValue(arr[0], "prop", 'arr[0]');