tor-browser

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

S15.1.3.3_A5.1.js (784B)


      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 encodeURI has the attribute DontEnum
      6 esid: sec-encodeuri-uri
      7 description: Checking use propertyIsEnumerable, for-in
      8 ---*/
      9 
     10 //CHECK#1
     11 if (encodeURI.propertyIsEnumerable('length') !== false) {
     12  throw new Test262Error('#1: encodeURI.propertyIsEnumerable(\'length\') === false. Actual: ' + (encodeURI.propertyIsEnumerable('length')));
     13 }
     14 
     15 //CHECK#2
     16 var result = true;
     17 for (var p in encodeURI) {
     18  if (p === "length") {
     19    result = false;
     20  }
     21 }
     22 
     23 if (result !== true) {
     24  throw new Test262Error('#2: result = true; for (p in encodeURI) { if (p === "length") result = false; }  result === true;');
     25 }
     26 
     27 reportCompare(0, 0);