|
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 * Global object properties have attributes { DontEnum } |
|
6 * |
|
7 * @path ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js |
|
8 * @description Global execution context - Function Properties |
|
9 */ |
|
10 |
|
11 var evalStr = |
|
12 '//CHECK#1\n'+ |
|
13 'for (var x in this) {\n'+ |
|
14 ' if ( x === \'eval\' ) {\n'+ |
|
15 ' $ERROR("#1: \'eval\' have attribute DontEnum");\n'+ |
|
16 ' } else if ( x === \'parseInt\' ) {\n'+ |
|
17 ' $ERROR("#1: \'parseInt\' have attribute DontEnum");\n'+ |
|
18 ' } else if ( x === \'parseFloat\' ) {\n'+ |
|
19 ' $ERROR("#1: \'parseFloat\' have attribute DontEnum");\n'+ |
|
20 ' } else if ( x === \'isNaN\' ) {\n'+ |
|
21 ' $ERROR("#1: \'isNaN\' have attribute DontEnum");\n'+ |
|
22 ' } else if ( x === \'isFinite\' ) {\n'+ |
|
23 ' $ERROR("#1: \'isFinite\' have attribute DontEnum");\n'+ |
|
24 ' } else if ( x === \'decodeURI\' ) {\n'+ |
|
25 ' $ERROR("#1: \'decodeURI\' have attribute DontEnum");\n'+ |
|
26 ' } else if ( x === \'decodeURIComponent\' ) {\n'+ |
|
27 ' $ERROR("#1: \'decodeURIComponent\' have attribute DontEnum");\n'+ |
|
28 ' } else if ( x === \'encodeURI\' ) {\n'+ |
|
29 ' $ERROR("#1: \'encodeURI\' have attribute DontEnum");\n'+ |
|
30 ' } else if ( x === \'encodeURIComponent\' ) {\n'+ |
|
31 ' $ERROR("#1: \'encodeURIComponent\' have attribute DontEnum");\n'+ |
|
32 ' }\n'+ |
|
33 '}\n'; |
|
34 |
|
35 eval(evalStr); |
|
36 |