tor-browser

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

S10.6_A4.js (814B)


      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 initial value of the created property callee is the
      7    Function object being executed
      8 es5id: 10.6_A4
      9 description: Checking that arguments.callee === function object
     10 flags: [noStrict]
     11 ---*/
     12 
     13 //CHECK#1
     14 function f1(){
     15  return arguments.callee;
     16 }
     17 
     18 try{
     19  if(f1 !== f1()){
     20    throw new Test262Error('#1: arguments.callee === f1');
     21  }
     22 }
     23 catch(e){
     24  throw new Test262Error("#1: arguments object doesn't exists");
     25 }
     26 
     27 //CHECK#2
     28 var f2 = function(){return arguments.callee;};
     29 
     30 try{
     31  if(f2 !== f2()){
     32    throw new Test262Error('#2: arguments.callee === f2');
     33  }
     34 }
     35 catch(e){
     36  throw new Test262Error("#1: arguments object doesn't exists");
     37 }
     38 
     39 reportCompare(0, 0);