|
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 * A property is created with name callee with property |
|
6 * attributes { DontEnum } and no others |
|
7 * |
|
8 * @path ch10/10.6/S10.6_A3_T3.js |
|
9 * @description Checking if deleting arguments.callee property fails |
|
10 * @noStrict |
|
11 */ |
|
12 |
|
13 //CHECK#1 |
|
14 function f1(){ |
|
15 return (delete arguments.callee); |
|
16 } |
|
17 |
|
18 try{ |
|
19 if(!f1()){ |
|
20 $ERROR("#1: A property callee have attribute { DontDelete }"); |
|
21 } |
|
22 } |
|
23 catch(e){ |
|
24 $ERROR("#1: arguments object don't exists"); |
|
25 } |
|
26 |
|
27 //CHECK#2 |
|
28 var f2 = function(){ |
|
29 return (delete arguments.callee); |
|
30 } |
|
31 |
|
32 try{ |
|
33 if(!f2()){ |
|
34 $ERROR("#2: A property callee have attribute { DontDelete }"); |
|
35 } |
|
36 } |
|
37 catch(e){ |
|
38 $ERROR("#2: arguments object don't exists"); |
|
39 } |
|
40 |