S10.6_A3_T4.js (942B)
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 A property is created with name callee with property 7 attributes { DontEnum } and no others 8 es5id: 10.6_A3_T4 9 description: Overriding arguments.callee property 10 flags: [noStrict] 11 ---*/ 12 13 var str = "something different"; 14 //CHECK#1 15 function f1(){ 16 arguments.callee = str; 17 return arguments; 18 } 19 20 try{ 21 if(f1().callee !== str){ 22 throw new Test262Error("#1: A property callee have attribute { ReadOnly }"); 23 } 24 } 25 catch(e){ 26 throw new Test262Error("#1: arguments object don't exists"); 27 } 28 29 //CHECK#2 30 var f2 = function(){ 31 arguments.callee = str; 32 return arguments; 33 } 34 try{ 35 if(f2().callee !== str){ 36 throw new Test262Error("#2: A property callee have attribute { ReadOnly }"); 37 } 38 } 39 catch(e){ 40 throw new Test262Error("#2: arguments object don't exists"); 41 } 42 43 reportCompare(0, 0);