Debian Codegraph @

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