tor-browser

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

S15.1.3.1_A2.1_T1.js (700B)


      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: If string.charAt(k) not equal "%", return this char
      6 esid: sec-decodeuri-encodeduri
      7 description: Complex tests
      8 includes: [decimalToHexString.js]
      9 ---*/
     10 
     11 for (var indexI = 0; indexI <= 65535; indexI++) {
     12  if (indexI !== 0x25) {
     13    try {
     14      var str = String.fromCharCode(indexI);
     15      var differs = decodeURI(str) !== str;
     16    } catch (e) {
     17      throw new Test262Error('#' + decimalToHexString(indexI) + ' throws');
     18    }
     19    if (differs) {
     20      throw new Test262Error('#' + decimalToHexString(indexI) + ' differs');
     21    }
     22  }
     23 }
     24 
     25 reportCompare(0, 0);