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-38-1.js (747B)


      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-38-1
      6 description: >
      7    Object.defineProperties - 'P' exists in 'O' is an accessor
      8    property, test 'P' makes no change if 'desc' is generic descriptor
      9    without any attribute (8.12.9 step 5)
     10 includes: [propertyHelper.js]
     11 ---*/
     12 
     13 
     14 var obj = {};
     15 var getFunc = function() {
     16  return 12;
     17 };
     18 Object.defineProperties(obj, {
     19  foo: {
     20    get: getFunc,
     21    enumerable: true,
     22    configurable: true
     23  }
     24 });
     25 
     26 Object.defineProperties(obj, {
     27  foo: {}
     28 });
     29 
     30 verifyEqualTo(obj, "foo", getFunc());
     31 
     32 verifyProperty(obj, "foo", {
     33  enumerable: true,
     34  configurable: true,
     35 });
     36 
     37 reportCompare(0, 0);