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-25.js (606B)


      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-25
      6 description: >
      7    Object.defineProperties - 'P' doesn't exist in 'O', test TypeError
      8    is thrown when 'O' is not extensible (8.12.9 step 3)
      9 ---*/
     10 
     11 var obj = {};
     12 Object.preventExtensions(obj);
     13 assert.throws(TypeError, function() {
     14  Object.defineProperties(obj, {
     15    prop: {
     16      value: 12,
     17      configurable: true
     18    }
     19  });
     20 });
     21 assert.sameValue(obj.hasOwnProperty("prop"), false, 'obj.hasOwnProperty("prop")');
     22 
     23 reportCompare(0, 0);