tor-browser

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

15.2.3.7-6-a-202.js (930B)


      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.7-6-a-202
      6 description: >
      7    Object.defineProperties - 'O' is an Array, 'P' is an array index
      8    named property, 'P' property doesn't exist in 'O', test [[Set]] of
      9    'P' property in 'Attributes' is set as undefined value if [[Set]]
     10    is absent in accessor descriptor 'desc'  (15.4.5.1 step 4.c)
     11 includes: [propertyHelper.js]
     12 ---*/
     13 
     14 var arr = [];
     15 var getFunc = function() {
     16  return 11;
     17 };
     18 
     19 Object.defineProperties(arr, {
     20  "0": {
     21    get: getFunc,
     22    enumerable: true,
     23    configurable: true
     24  }
     25 });
     26 
     27 var desc = Object.getOwnPropertyDescriptor(arr, "0");
     28 
     29 verifyProperty(arr, "0", {
     30  enumerable: true,
     31  configurable: true,
     32 });
     33 
     34 assert.sameValue(typeof desc.set, "undefined", 'typeof desc.set');
     35 assert.sameValue(desc.get, getFunc, 'desc.get');
     36 
     37 reportCompare(0, 0);