Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/seal/15.2.3.8-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.8-2-a-2
6 description: >
7 Object.seal - 'P' is own data property that overrides an inherited
8 data property
9 includes: [propertyHelper.js]
10 ---*/
11
12 var proto = {
13 foo: 0
14 };
15
16 var ConstructFun = function() {};
17 ConstructFun.prototype = proto;
18
19 var obj = new ConstructFun();
20 Object.defineProperty(obj, "foo", {
21 value: 10,
22 configurable: true
23 });
24
25 assert(Object.isExtensible(obj));
26 Object.seal(obj);
27
28 verifyNotConfigurable(obj, "foo");
29 assert.sameValue(obj.foo, 10);