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-291-1.js
blob04faea4a9e20d570adad9cbc5af17ec0f52fb473
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-291-1
6 description: >
7     Object.defineProperty - 'O' is an Arguments object of a function
8     that has formal parameters, 'name' is own accessor property of 'O'
9     which is also defined in [[ParameterMap]] of 'O', and 'desc' is
10     accessor descriptor, test updating multiple attribute values of
11     'name' (10.6 [[DefineOwnProperty]] step 3 and 5.a.i)
12 includes: [propertyHelper.js]
13 ---*/
15 (function(a, b, c) {
16   function getFunc1() {
17     return 10;
18   }
19   Object.defineProperty(arguments, "0", {
20     get: getFunc1,
21     enumerable: true,
22     configurable: true
23   });
25   function getFunc2() {
26     return 20;
27   }
28   Object.defineProperty(arguments, "0", {
29     get: getFunc2,
30     enumerable: false,
31     configurable: false
32   });
33   if (a !== 0) {
34     throw new Test262Error('Expected a === 0, actually ' + a);
35   }
37   verifyEqualTo(arguments, "0", getFunc2());
39   verifyNotEnumerable(arguments, "0");
41   verifyNotConfigurable(arguments, "0");
42 }(0, 1, 2));
44 reportCompare(0, 0);