tor-browser

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

S13_A12_T2.js (1085B)


      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: Function declarations in global or function scope are {DontDelete}
      6 es5id: 13_A12_T2
      7 description: >
      8    Checking if deleting a function that is declared in function scope
      9    fails
     10 flags: [noStrict]
     11 ---*/
     12 
     13 ALIVE="Letov is alive"
     14 
     15 function __cont(){
     16 
     17    function __func(){
     18        return ALIVE;
     19    };
     20    
     21    //////////////////////////////////////////////////////////////////////////////
     22    //CHECK#1
     23    if (delete __func) {
     24    	throw new Test262Error('#1: delete __func returning false');
     25    }
     26    //
     27    //////////////////////////////////////////////////////////////////////////////
     28    
     29    //////////////////////////////////////////////////////////////////////////////
     30    //CHECK#2
     31    if (__func() !== ALIVE) {
     32    	throw new Test262Error('#2: __func() === ALIVE. Actual: __func() ==='+__func());
     33    }
     34    //
     35    //////////////////////////////////////////////////////////////////////////////
     36 };
     37 
     38 __cont();
     39 
     40 reportCompare(0, 0);