1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,36 @@ 1.4 +// Copyright 2009 the Sputnik authors. All rights reserved. 1.5 +// This code is governed by the BSD license found in the LICENSE file. 1.6 + 1.7 +/** 1.8 + * Global object properties have attributes { DontEnum } 1.9 + * 1.10 + * @path ch10/10.2/10.2.3/S10.2.3_A2.3_T2.js 1.11 + * @description Global execution context - Function Properties 1.12 + */ 1.13 + 1.14 +var evalStr = 1.15 +'//CHECK#1\n'+ 1.16 +'for (var x in this) {\n'+ 1.17 +' if ( x === \'eval\' ) {\n'+ 1.18 +' $ERROR("#1: \'eval\' have attribute DontEnum");\n'+ 1.19 +' } else if ( x === \'parseInt\' ) {\n'+ 1.20 +' $ERROR("#1: \'parseInt\' have attribute DontEnum");\n'+ 1.21 +' } else if ( x === \'parseFloat\' ) {\n'+ 1.22 +' $ERROR("#1: \'parseFloat\' have attribute DontEnum");\n'+ 1.23 +' } else if ( x === \'isNaN\' ) {\n'+ 1.24 +' $ERROR("#1: \'isNaN\' have attribute DontEnum");\n'+ 1.25 +' } else if ( x === \'isFinite\' ) {\n'+ 1.26 +' $ERROR("#1: \'isFinite\' have attribute DontEnum");\n'+ 1.27 +' } else if ( x === \'decodeURI\' ) {\n'+ 1.28 +' $ERROR("#1: \'decodeURI\' have attribute DontEnum");\n'+ 1.29 +' } else if ( x === \'decodeURIComponent\' ) {\n'+ 1.30 +' $ERROR("#1: \'decodeURIComponent\' have attribute DontEnum");\n'+ 1.31 +' } else if ( x === \'encodeURI\' ) {\n'+ 1.32 +' $ERROR("#1: \'encodeURI\' have attribute DontEnum");\n'+ 1.33 +' } else if ( x === \'encodeURIComponent\' ) {\n'+ 1.34 +' $ERROR("#1: \'encodeURIComponent\' have attribute DontEnum");\n'+ 1.35 +' }\n'+ 1.36 +'}\n'; 1.37 + 1.38 +eval(evalStr); 1.39 +