tor-browser

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

S15.4.2.1_A1.2_T1.js (643B)


      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: The [[Class]] property of the newly constructed object is set to "Array"
      6 es5id: 15.4.2.1_A1.2_T1
      7 description: Checking use Object.prototype.toString
      8 ---*/
      9 
     10 var x = new Array();
     11 x.getClass = Object.prototype.toString;
     12 assert.sameValue(x.getClass(), "[object Array]", 'x.getClass() must return "[object Array]"');
     13 
     14 var x = new Array(0, 1, 2);
     15 x.getClass = Object.prototype.toString;
     16 assert.sameValue(x.getClass(), "[object Array]", 'x.getClass() must return "[object Array]"');
     17 
     18 reportCompare(0, 0);