tor-browser

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

S15.1.3.4_A5.2.js (1031B)


      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    The length property of encodeURIComponent does not have the attribute
      7    DontDelete
      8 esid: sec-encodeuricomponent-uricomponent
      9 description: Checking use hasOwnProperty, delete
     10 ---*/
     11 
     12 //CHECK#1
     13 if (encodeURIComponent.hasOwnProperty('length') !== true) {
     14  throw new Test262Error('#1: encodeURIComponent.hasOwnProperty(\'length\') === true. Actual: ' + (encodeURIComponent.hasOwnProperty('length')));
     15 }
     16 
     17 delete encodeURIComponent.length;
     18 
     19 //CHECK#2
     20 if (encodeURIComponent.hasOwnProperty('length') !== false) {
     21  throw new Test262Error('#2: delete encodeURIComponent.length; encodeURIComponent.hasOwnProperty(\'length\') === false. Actual: ' + (encodeURIComponent.hasOwnProperty('length')));
     22 }
     23 
     24 //CHECK#3
     25 if (encodeURIComponent.length === undefined) {
     26  throw new Test262Error('#3: delete encodeURIComponent.length; encodeURIComponent.length !== undefined');
     27 }
     28 
     29 reportCompare(0, 0);