Backed out 3 changesets (bug 1892041) for causing failures on async-module-does-not...
[gecko.git] / js / src / tests / test262 / built-ins / Object / freeze / 15.2.3.9-2-a-3.js
blob9e70497f78750153568560a85c432bbafcb59edc
1 // Copyright (c) 2012 Ecma International.  All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 es5id: 15.2.3.9-2-a-3
6 description: >
7     Object.freeze - 'P' is own data property that overrides an
8     inherited accessor property
9 includes: [propertyHelper.js]
10 ---*/
12 var proto = {};
14 Object.defineProperty(proto, "foo", {
15   get: function() {
16     return 0;
17   },
18   configurable: true
19 });
21 var Con = function() {};
22 Con.prototype = proto;
24 var child = new Con();
25 Object.defineProperty(child, "foo", {
26   value: 10,
27   configurable: true
28 });
30 Object.freeze(child);
32 verifyNotWritable(child, "foo");
33 verifyNotConfigurable(child, "foo");
34 assert.sameValue(child.foo, 10);
36 reportCompare(0, 0);