Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Object / freeze / 15.2.3.9-2-a-5.js
blobf08d4110092be0748e28d6deaeafc4ec443a8c15
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-5
6 description: >
7     Object.freeze - 'P' is own accessor property that overrides an
8     inherited data property
9 includes: [propertyHelper.js]
10 ---*/
13 var proto = {};
15 proto.foo = 0; // default [[Configurable]] attribute value of foo: true
17 var Con = function() {};
18 Con.prototype = proto;
20 var child = new Con();
22 Object.defineProperty(child, "foo", {
23   get: function() {
24     return 10;
25   },
26   configurable: true
27 });
29 Object.freeze(child);
31 verifyProperty(child, "foo", {
32   configurable: false,
33 });
35 assert.sameValue(child.foo, 10);
37 reportCompare(0, 0);