tor-browser

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

15.2.3.4-4-46.js (624B)


      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.4-4-46
      6 description: >
      7    Object.getOwnPropertyNames - inherited accessor property of Array
      8    object 'O' is not pushed into the returned array.
      9 ---*/
     10 
     11 var arr = [0, 1, 2];
     12 
     13 Object.defineProperty(Array.prototype, "protoProperty", {
     14  get: function() {
     15    return "protoArray";
     16  },
     17  configurable: true
     18 });
     19 
     20 var result = Object.getOwnPropertyNames(arr);
     21 
     22 for (var p in result) {
     23  assert.notSameValue(result[p], "protoProperty", 'result[p]');
     24 }
     25 
     26 reportCompare(0, 0);