tor-browser

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

15.2.3.6-4-198.js (665B)


      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.6-4-198
      6 description: >
      7    Object.defineProperty - 'O' is an Array, 'name' is an array index
      8    named property, 'name' property doesn't exist in 'O', test
      9    TypeError is thrown when 'O' is not extensible (15.4.5.1 step 4.c)
     10 ---*/
     11 
     12 var arrObj = [];
     13 Object.preventExtensions(arrObj);
     14 assert.throws(TypeError, function() {
     15  var desc = {
     16    value: 1
     17  };
     18  Object.defineProperty(arrObj, "0", desc);
     19 });
     20 assert.sameValue(arrObj.hasOwnProperty("0"), false, 'arrObj.hasOwnProperty("0")');
     21 
     22 reportCompare(0, 0);