15.2.3.5-4-15.js (708B)
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.5-4-15 6 description: > 7 Object.create - argument 'Properties' is the Aguments object 8 (15.2.3.7 step 2) 9 ---*/ 10 11 var result = false; 12 13 var argObj = (function() { 14 return arguments; 15 })(); 16 17 Object.defineProperty(argObj, "prop", { 18 get: function() { 19 result = ('[object Arguments]' === Object.prototype.toString.call(this)); 20 return {}; 21 }, 22 enumerable: true 23 }); 24 25 var newObj = Object.create({}, argObj); 26 27 assert(result, 'result !== true'); 28 assert(newObj.hasOwnProperty("prop"), 'newObj.hasOwnProperty("prop") !== true'); 29 30 reportCompare(0, 0);