tor-browser

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

S15.9.3.2_A3_T1.2.js (1465B)


      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    The [[Class]] property of the newly constructed object
      7    is set to "Date"
      8 esid: sec-date-value
      9 description: Test based on overwriting prototype.toString
     10 includes: [dateConstants.js]
     11 ---*/
     12 
     13 Date.prototype.toString = Object.prototype.toString;
     14 
     15 var x1 = new Date(date_1899_end);
     16 assert.sameValue(x1.toString(), "[object Date]", 'x1.toString() must return "[object Date]"');
     17 
     18 var x2 = new Date(date_1900_start);
     19 assert.sameValue(x2.toString(), "[object Date]", 'x2.toString() must return "[object Date]"');
     20 
     21 var x3 = new Date(date_1969_end);
     22 assert.sameValue(x3.toString(), "[object Date]", 'x3.toString() must return "[object Date]"');
     23 
     24 var x4 = new Date(date_1970_start);
     25 assert.sameValue(x4.toString(), "[object Date]", 'x4.toString() must return "[object Date]"');
     26 
     27 var x5 = new Date(date_1999_end);
     28 assert.sameValue(x5.toString(), "[object Date]", 'x5.toString() must return "[object Date]"');
     29 
     30 var x6 = new Date(date_2000_start);
     31 assert.sameValue(x6.toString(), "[object Date]", 'x6.toString() must return "[object Date]"');
     32 
     33 var x7 = new Date(date_2099_end);
     34 assert.sameValue(x7.toString(), "[object Date]", 'x7.toString() must return "[object Date]"');
     35 
     36 var x8 = new Date(date_2100_start);
     37 assert.sameValue(x8.toString(), "[object Date]", 'x8.toString() must return "[object Date]"');
     38 
     39 reportCompare(0, 0);