tor-browser

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

S15.2.3.6_A2.js (538B)


      1 // Copyright 2011 Google Inc.  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_A2
      6 description: >
      7    Checks if an inherited accessor property appears to be  an own
      8    property.
      9 ---*/
     10 
     11 var base = {};
     12 var derived = Object.create(base);
     13 
     14 function getter() {
     15  return 'gotten';
     16 }
     17 Object.defineProperty(base, 'foo', {
     18  get: getter
     19 });
     20 
     21 assert(
     22  !derived.hasOwnProperty('foo'),
     23  'The value of !derived.hasOwnProperty("foo") is expected to be true'
     24 );
     25 
     26 reportCompare(0, 0);