Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperty/15.2.3.6-4-587.js

raw
1 // Copyright (c) 2012 Ecma International. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 es5id: 15.2.3.6-4-587
6 description: ES5 Attributes - Inherited property is non-enumerable (Math)
7 ---*/
8
9 var data = "data";
10
11 Object.defineProperty(Object.prototype, "prop", {
12 get: function() {
13 return data;
14 },
15 enumerable: false,
16 configurable: true
17 });
18 var verifyEnumerable = false;
19 for (var p in Math) {
20 if (p === "prop") {
21 verifyEnumerable = true;
22 }
23 }
24
25 assert.sameValue(Math.hasOwnProperty("prop"), false, 'Math.hasOwnProperty("prop")');
26 assert.sameValue(verifyEnumerable, false, 'verifyEnumerable');