Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Object / defineProperties / 15.2.3.7-5-b-147.js
bloba6a0dc8021317a36d14b56d38f7f4ba05dcecf9b
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.7-5-b-147
6 description: >
7     Object.defineProperties - 'writable' property of 'descObj' is own
8     accessor property that overrides an inherited accessor property
9     (8.10.5 step 6.a)
10 includes: [propertyHelper.js]
11 ---*/
13 var obj = {};
15 var proto = {};
17 Object.defineProperty(proto, "writable", {
18   get: function() {
19     return true;
20   }
21 });
23 var Con = function() {};
24 Con.prototype = proto;
26 var descObj = new Con();
28 Object.defineProperty(descObj, "writable", {
29   get: function() {
30     return false;
31   }
32 });
34 Object.defineProperties(obj, {
35   property: descObj
36 });
38 verifyProperty(obj, "property", {
39   writable: false,
40 });
42 reportCompare(0, 0);