tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

15.2.3.6-4-211.js (879B)


      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-211
      6 description: >
      7    Object.defineProperty - 'O' is an Array, 'name' is an array index
      8    named property, 'name' makes no change if every field in 'desc' is
      9    absent(name is accessor property) (15.4.5.1 step 4.c)
     10 includes: [propertyHelper.js]
     11 ---*/
     12 
     13 var arrObj = [];
     14 
     15 function getFunc() {
     16  return 11;
     17 }
     18 
     19 function setFunc(value) {
     20  arrObj.setVerifyHelpProp = value;
     21 }
     22 
     23 Object.defineProperty(arrObj, "0", {
     24  get: getFunc,
     25  set: setFunc,
     26  enumerable: true,
     27  configurable: true
     28 });
     29 
     30 Object.defineProperty(arrObj, "0", {});
     31 verifyEqualTo(arrObj, "0", getFunc());
     32 
     33 verifyWritable(arrObj, "0", "setVerifyHelpProp");
     34 
     35 verifyProperty(arrObj, "0", {
     36  enumerable: true,
     37  configurable: true,
     38 });
     39 
     40 reportCompare(0, 0);