tor-browser

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

S15.2.1.1_A1_T2.js (1265B)


      1 // Copyright 2009 the Sputnik authors.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 info: |
      6    When the Object(value) is called and the value is null, undefined or not supplied,
      7    create and return a new Object object if the object constructor had been called with the same arguments (15.2.2.1)
      8 es5id: 15.2.1.1_A1_T2
      9 description: Creating Object(void 0) and checking its properties
     10 ---*/
     11 
     12 //var y= void 0;
     13 
     14 var __obj = Object(void 0);
     15 
     16 var n__obj = new Object(void 0);
     17 
     18 
     19 assert.sameValue(
     20  __obj.toString(),
     21  n__obj.toString(),
     22  '__obj.toString() must return the same value returned by n__obj.toString()'
     23 );
     24 
     25 assert.sameValue(
     26  __obj.constructor,
     27  n__obj.constructor,
     28  'The value of __obj.constructor is expected to equal the value of n__obj.constructor'
     29 );
     30 
     31 assert.sameValue(
     32  __obj.prototype,
     33  n__obj.prototype,
     34  'The value of __obj.prototype is expected to equal the value of n__obj.prototype'
     35 );
     36 
     37 assert.sameValue(
     38  __obj.toLocaleString(),
     39  n__obj.toLocaleString(),
     40  '__obj.toLocaleString() must return the same value returned by n__obj.toLocaleString()'
     41 );
     42 
     43 assert.sameValue(typeof __obj, typeof n__obj, 'The value of `typeof __obj` is expected to be typeof n__obj');
     44 
     45 reportCompare(0, 0);