tor-browser

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

15.2.3.5-3-1.js (616B)


      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 info: |
      6    create sets the [[Prototype]] of the created object to first parameter.
      7    This can be checked using isPrototypeOf, or getPrototypeOf.
      8 es5id: 15.2.3.5-3-1
      9 description: Object.create sets the prototype of the passed-in object
     10 ---*/
     11 
     12 function base() {}
     13 var b = new base();
     14 var d = Object.create(b);
     15 
     16 assert.sameValue(Object.getPrototypeOf(d), b, 'Object.getPrototypeOf(d)');
     17 assert.sameValue(b.isPrototypeOf(d), true, 'b.isPrototypeOf(d)');
     18 
     19 reportCompare(0, 0);