tor-browser

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

15.2.3.7-6-a-20.js (660B)


      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.7-6-a-20
      6 description: >
      7    Object.defineProperties - 'O' is a JSON object which implements
      8    its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 )
      9 ---*/
     10 
     11 Object.defineProperty(JSON, "prop", {
     12  value: 11,
     13  writable: true,
     14  configurable: true
     15 });
     16 var hasProperty = JSON.hasOwnProperty("prop") && JSON.prop === 11;
     17 Object.defineProperties(JSON, {
     18  prop: {
     19    value: 12
     20  }
     21 });
     22 
     23 assert(hasProperty, 'hasProperty !== true');
     24 assert.sameValue(JSON.prop, 12, 'JSON.prop');
     25 
     26 reportCompare(0, 0);