tor-browser

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

15.2.3.6-4-405.js (673B)


      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-405
      6 description: >
      7    ES5 Attributes - Failed to add a property to an object when the
      8    object's object has a property with same name and [[Writable]]
      9    attribute is set to false (Number instance)
     10 includes: [propertyHelper.js]
     11 ---*/
     12 
     13 Object.defineProperty(Number.prototype, "prop", {
     14  value: 1001,
     15  writable: false,
     16  enumerable: false,
     17  configurable: true
     18 });
     19 
     20 var numObj = new Number();
     21 
     22 assert(!numObj.hasOwnProperty("prop"));
     23 verifyNotWritable(numObj, "prop", "noCheckOwnProp");
     24 
     25 reportCompare(0, 0);