Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/isFrozen/15.2.3.12-2-a-2.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.12-2-a-2
6 description: >
7 Object.isFrozen - 'P' is own data property that overrides an
8 inherited data property
9 ---*/
10
11 var proto = {};
12
13 Object.defineProperty(proto, "foo", {
14 value: 9,
15 writable: false,
16 configurable: false
17 });
18
19 var Con = function() {};
20 Con.prototype = proto;
21 var child = new Con();
22
23 Object.defineProperty(child, "foo", {
24 value: 12,
25 writable: true,
26 configurable: false
27 });
28
29 Object.preventExtensions(child);
30
31 assert.sameValue(Object.isFrozen(child), false, 'Object.isFrozen(child)');