Backed out 3 changesets (bug 1892041) for causing failures on async-module-does-not...
[gecko.git] / js / src / tests / test262 / built-ins / Object / defineProperties / 15.2.3.7-6-a-89.js
blobae7c1d6aa4599642bfaad2155de6d2c24875c0fd
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-6-a-89
6 description: >
7     Object.defineProperties will not throw TypeError when
8     P.configurable is false, P.[[Set]] and properties.[[Set]] are
9     undefined (8.12.9 step 11.a.i)
10 includes: [propertyHelper.js]
11 ---*/
14 var obj = {};
16 function get_Func() {
17   return 0;
20 Object.defineProperty(obj, "foo", {
21   get: get_Func,
22   set: undefined,
23   enumerable: false,
24   configurable: false
25 });
27 Object.defineProperties(obj, {
28   foo: {
29     set: undefined
30   }
31 });
33 verifyNotEnumerable(obj, "foo");
35 verifyNotConfigurable(obj, "foo");
37 var desc = Object.getOwnPropertyDescriptor(obj, "foo");
39 if (typeof(desc.set) !== "undefined") {
40   throw new Test262Error('Expected typeof (desc.set) === "undefined", actually ' + typeof(desc.set));
43 reportCompare(0, 0);