tor-browser

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

15.2.3.6-4-402.js (636B)


      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-402
      6 description: >
      7    ES5 Attributes - [[Value]] attribute of inherited property of
      8    [[Prototype]] internal property is correct (String instance)
      9 ---*/
     10 
     11 Object.defineProperty(String.prototype, "prop", {
     12  value: 1001,
     13  writable: true,
     14  enumerable: true,
     15  configurable: true
     16 });
     17 var strObj = new String();
     18 
     19 assert.sameValue(strObj.hasOwnProperty("prop"), false, 'strObj.hasOwnProperty("prop")');
     20 assert.sameValue(strObj.prop, 1001, 'strObj.prop');
     21 
     22 reportCompare(0, 0);