tor-browser

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

S15.1.3.1_A3_T1.js (1703B)


      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    Let reservedURISet be a string containing one instance of each character valid
      7    in uriReserved plus "#"
      8 esid: sec-decodeuri-encodeduri
      9 description: Checking all character in reservedURISet. HexDigit in [0..9, A..F]
     10 ---*/
     11 
     12 //CHECK#1
     13 if (decodeURI("%3B") !== "%3B") {
     14  throw new Test262Error('#1: decodeURI("%3B") equal "%3B", not ";"');
     15 }
     16 
     17 //CHECK#2
     18 if (decodeURI("%2F") !== "%2F") {
     19  throw new Test262Error('#2: decodeURI("%2F") equal "%2F", not "/"');
     20 }
     21 
     22 //CHECK#3
     23 if (decodeURI("%3F") !== "%3F") {
     24  throw new Test262Error('#3: decodeURI("%3F") equal "%3F", not "?"');
     25 }
     26 
     27 //CHECK#4
     28 if (decodeURI("%3A") !== "%3A") {
     29  throw new Test262Error('#4: decodeURI("%3A") equal "%3A", not ":"');
     30 }
     31 
     32 //CHECK#5
     33 if (decodeURI("%40") !== "%40") {
     34  throw new Test262Error('#5: decodeURI("%40") equal "%40", not "@"');
     35 }
     36 
     37 //CHECK#6
     38 if (decodeURI("%26") !== "%26") {
     39  throw new Test262Error('#6: decodeURI("%26") equal "%26", not "&"');
     40 }
     41 
     42 //CHECK#7
     43 if (decodeURI("%3D") !== "%3D") {
     44  throw new Test262Error('#7.1: decodeURI("%3D") equal "%3D", not "="');
     45 }
     46 
     47 //CHECK#8
     48 if (decodeURI("%2B") !== "%2B") {
     49  throw new Test262Error('#8.1: decodeURI("%2B") equal "%2B", not "+"');
     50 }
     51 
     52 //CHECK#9
     53 if (decodeURI("%24") !== "%24") {
     54  throw new Test262Error('#9: decodeURI("%24") equal "%24", not "$"');
     55 }
     56 
     57 //CHECK#10
     58 if (decodeURI("%2C") !== "%2C") {
     59  throw new Test262Error('#10: decodeURI("%2C") equal "%2C", not ","');
     60 }
     61 
     62 //CHECK#11
     63 if (decodeURI("%23") !== "%23") {
     64  throw new Test262Error('#11: decodeURI("%23") equal "%23", not "#"');
     65 }
     66 
     67 reportCompare(0, 0);