Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Object / seal / object-seal-p-is-own-accessor-property-that-overrides-an-inherited-accessor-property.js
blob7aea052abe1fcf4abf5398afc4c5c64e5e708ba0
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 esid: sec-setintegritylevel
6 description: >
7     Object.seal - 'P' is own accessor 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 ConstructFun = function() {};
22 ConstructFun.prototype = proto;
24 var obj = new ConstructFun();
26 Object.defineProperty(obj, "foo", {
27   get: function() {
28     return 10;
29   },
30   configurable: true
31 });
33 assert(Object.isExtensible(obj));
34 Object.seal(obj);
36 verifyProperty(obj, "foo", {
37   configurable: false,
38 });
40 assert.sameValue(obj.foo, 10);
42 reportCompare(0, 0);