Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperty/15.2.3.6-4-43.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.6-4-43
6 description: >
7 Object.defineProperty - 'O' is an Arguments object which
8 implements its own [[GetOwnProperty]] method to access the 'name'
9 property (8.12.9 step 1)
10 ---*/
11
12 var argObj = (function() {
13 return arguments;
14 })();
15
16 Object.defineProperty(argObj, "foo", {
17 value: 12,
18 configurable: false
19 });
20 assert.throws(TypeError, function() {
21 Object.defineProperty(argObj, "foo", {
22 value: 11,
23 configurable: true
24 });
25 });
26 assert.sameValue(argObj.foo, 12, 'argObj.foo');