tor-browser

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

15.2.3.14-5-4.js (777B)


      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.14-5-4
      6 description: >
      7    Object.keys - non-enumerable own accessor property of 'O' is not
      8    defined in returned array
      9 ---*/
     10 
     11 var obj = {};
     12 
     13 Object.defineProperty(obj, "prop1", {
     14  get: function() {},
     15  enumerable: true,
     16  configurable: true
     17 });
     18 Object.defineProperty(obj, "prop2", {
     19  get: function() {},
     20  enumerable: false,
     21  configurable: true
     22 });
     23 Object.defineProperty(obj, "prop3", {
     24  get: function() {},
     25  enumerable: true,
     26  configurable: true
     27 });
     28 
     29 var arr = Object.keys(obj);
     30 
     31 for (var p in arr) {
     32  if (arr.hasOwnProperty(p)) {
     33    assert.notSameValue(arr[p], "prop2", 'arr[p]');
     34  }
     35 }
     36 
     37 reportCompare(0, 0);