tor-browser

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

15.2.3.6-4-278.js (874B)


      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-278
      6 description: >
      7    Object.defineProperty - 'name' is generic property that won't
      8    exist on 'O', and 'desc' is accessor descriptor, test 'name' is
      9    defined in 'O' with all correct attribute values (15.4.5.1 step 5)
     10 includes: [propertyHelper.js]
     11 ---*/
     12 
     13 
     14 var arrObj = [];
     15 
     16 function getFunc() {
     17  return 12;
     18 }
     19 
     20 function setFunc(value) {
     21  arrObj.setVerifyHelpProp = value;
     22 }
     23 
     24 Object.defineProperty(arrObj, "property", {
     25  get: getFunc,
     26  set: setFunc,
     27  enumerable: true,
     28  configurable: true
     29 });
     30 
     31 verifyEqualTo(arrObj, "property", getFunc());
     32 
     33 verifyWritable(arrObj, "property", "setVerifyHelpProp");
     34 
     35 verifyProperty(arrObj, "property", {
     36  enumerable: true,
     37  configurable: true,
     38 });
     39 
     40 reportCompare(0, 0);