Backed out 3 changesets (bug 1892041) for causing failures on async-module-does-not...
[gecko.git] / js / src / tests / test262 / built-ins / Object / defineProperty / 15.2.3.6-4-319.js
blobd4c4c20dc9fbf3d0c8eb84c9d3c0631320e2503a
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.6-4-319
6 description: >
7     Object.defineProperty - 'O' is an Arguments object, 'P' is own
8     data property of 'O', test TypeError is thrown when updating the
9     [[Enumerable]] attribute value of 'P' which is not configurable
10     (10.6 [[DefineOwnProperty]] step 4)
11 includes: [propertyHelper.js]
12 ---*/
14 (function() {
15   Object.defineProperty(arguments, "genericProperty", {
16     enumerable: true,
17     configurable: false
18   });
19   try {
20     Object.defineProperty(arguments, "genericProperty", {
21       enumerable: false
22     });
23     throw new Test262Error("Expected an exception.");
24   } catch (e) {
25     verifyEqualTo(arguments, "genericProperty", undefined);
27     verifyNotWritable(arguments, "genericProperty");
29     verifyEnumerable(arguments, "genericProperty");
31     verifyNotConfigurable(arguments, "genericProperty");
33     if (!(e instanceof TypeError)) {
34       throw new Test262Error("Expected TypeError, got " + e);
35     }
37   }
38 }(1, 2, 3));
40 reportCompare(0, 0);