tor-browser

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

S15.5.3.2_A1.js (1366B)


      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 length property of the fromCharCode function is 1
      6 es5id: 15.5.3.2_A1
      7 description: Checking String.fromCharCode.length
      8 ---*/
      9 
     10 //////////////////////////////////////////////////////////////////////////////
     11 //CHECK#1
     12 if (typeof String.fromCharCode !== "function") {
     13  throw new Test262Error('#1: typeof String.fromCharCode === "function". Actual: typeof String.fromCharCode ===' + typeof String.fromCharCode);
     14 }
     15 //
     16 //////////////////////////////////////////////////////////////////////////////
     17 
     18 //////////////////////////////////////////////////////////////////////////////
     19 //CHECK#2
     20 if (!(String.hasOwnProperty("fromCharCode"))) {
     21  throw new Test262Error('#2: String.hasOwnProperty("fromCharCode") return true. Actual: ' + String.hasOwnProperty("fromCharCode"));
     22 }
     23 //
     24 //////////////////////////////////////////////////////////////////////////////
     25 
     26 //////////////////////////////////////////////////////////////////////////////
     27 //CHECK#3
     28 if (String.fromCharCode.length !== 1) {
     29  throw new Test262Error('#3: String.fromCharCode.length === 1. Actual: String.fromCharCode.length ===' + String.fromCharCode.length);
     30 }
     31 //
     32 //////////////////////////////////////////////////////////////////////////////
     33 
     34 reportCompare(0, 0);