blob: 9ccb8b5c0e8492c72e0fa23756f31a534f4f7ec6 [file] [log] [blame]
keith_miller@apple.combcc77f22016-07-15 06:03:25 +00001// Copyright (c) 2012 Ecma International. All rights reserved.
2// This code is governed by the BSD license found in the LICENSE file.
3
4/*---
5es5id: 15.2.3.7-6-a-84-1
6description: >
7 Object.defineProperties will not throw TypeError when
8 P.configurable is false, P.writalbe is false, properties.value and
9 P.value are two Objects refer to the same object which has been
10 updated before use it to update the object (8.12.9 step 10.a.ii.1)
11includes: [propertyHelper.js]
12---*/
13
14
15var obj = {};
16
17var obj1 = { length: 10 };
18
19Object.defineProperty(obj, "foo", {
20 value: obj1,
21 writable: false,
22 configurable: false
23});
24
25var obj2 = obj1;
26obj2.y = "hello";
27
28Object.defineProperties(obj, {
29 foo: {
30 value: obj2
31 }
32});
33verifyEqualTo(obj, "foo", obj1);
34
35verifyNotWritable(obj, "foo");
36
37verifyNotEnumerable(obj, "foo");
38
39verifyNotConfigurable(obj, "foo");