tor-browser

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

15.2.3.6-4-334.js (859B)


      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-334
      6 description: >
      7    ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is
      8    true, [[Configurable]] is false) is enumerable
      9 ---*/
     10 
     11 var propertyFound = false;
     12 
     13 var obj = {};
     14 
     15 Object.defineProperty(obj, "prop", {
     16  value: 2010,
     17  writable: true,
     18  enumerable: true,
     19  configurable: false
     20 });
     21 var propertyDefineCorrect = obj.hasOwnProperty("prop");
     22 var desc = Object.getOwnPropertyDescriptor(obj, "prop");
     23 for (var p in obj) {
     24  if (p === "prop") {
     25    propertyFound = true;
     26    break;
     27  }
     28 }
     29 
     30 assert(propertyFound, 'Property not found');
     31 assert(propertyDefineCorrect, 'propertyDefineCorrect !== true');
     32 assert.sameValue(desc.enumerable, true, 'desc.enumerable');
     33 
     34 reportCompare(0, 0);