tor-browser

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

15.2.3.6-4-46.js (718B)


      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-46
      6 description: >
      7    Object.defineProperty - 'name' is defined as data property if
      8    'name' property doesn't exist in 'O' and 'desc' is generic
      9    descriptor (8.12.9 step 4.a)
     10 ---*/
     11 
     12 var obj = {};
     13 
     14 Object.defineProperty(obj, "property", {
     15  enumerable: true
     16 });
     17 
     18 var isEnumerable = false;
     19 for (var item in obj) {
     20  if (obj.hasOwnProperty(item) && item === "property") {
     21    isEnumerable = true;
     22  }
     23 }
     24 
     25 assert(obj.hasOwnProperty("property"), 'obj.hasOwnProperty("property") !== true');
     26 assert(isEnumerable, 'isEnumerable !== true');
     27 
     28 reportCompare(0, 0);