tor-browser

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

S7.4_A6.js (748B)


      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    If multi line comments csn not nest, they can contain any Unicode
      7    character
      8 es5id: 7.4_A6
      9 description: "\"var\"+ yy+ \"xx = 1\", insert instead of yy all Unicode characters"
     10 includes: [decimalToHexString.js]
     11 ---*/
     12 
     13 for (var indexI = 0; indexI <= 65535; indexI++) {
     14  try {
     15    var xx = 0;
     16    eval("/*var " + String.fromCharCode(indexI) + "xx = 1*/");
     17    var differs = xx !== 0;
     18  } catch (e){
     19    throw new Test262Error('#' + decimalToHexString(indexI) + ' throws');
     20  }
     21  if (differs) {
     22    throw new Test262Error('#' + decimalToHexString(indexI) + ' differs');
     23  }
     24 }
     25 
     26 reportCompare(0, 0);