js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.2_T2.js

changeset 0
6474c204b198
     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.2_T2.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,37 @@
     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.2_T2.js
    1.11 + * @description Function execution context - Function Properties
    1.12 + */
    1.13 +
    1.14 +function test() {
    1.15 +  //CHECK#1
    1.16 +  for (var x in this) {
    1.17 +    if ( x === 'eval' ) {
    1.18 +      $ERROR("#1: 'eval' have attribute DontEnum");
    1.19 +    } else if ( x === 'parseInt' ) {
    1.20 +      $ERROR("#1: 'parseInt' have attribute DontEnum");
    1.21 +    } else if ( x === 'parseFloat' ) {
    1.22 +      $ERROR("#1: 'parseFloat' have attribute DontEnum");
    1.23 +    } else if ( x === 'isNaN' ) {
    1.24 +      $ERROR("#1: 'isNaN' have attribute DontEnum");
    1.25 +    } else if ( x === 'isFinite' ) {
    1.26 +      $ERROR("#1: 'isFinite' have attribute DontEnum");
    1.27 +    } else if ( x === 'decodeURI' ) {
    1.28 +      $ERROR("#1: 'decodeURI' have attribute DontEnum");
    1.29 +    } else if ( x === 'decodeURIComponent' ) {
    1.30 +      $ERROR("#1: 'decodeURIComponent' have attribute DontEnum");
    1.31 +    } else if ( x === 'encodeURI' ) {
    1.32 +      $ERROR("#1: 'encodeURI' have attribute DontEnum");
    1.33 +    } else if ( x === 'encodeURIComponent' ) {
    1.34 +      $ERROR("#1: 'encodeURIComponent' have attribute DontEnum");
    1.35 +    } 
    1.36 +  }
    1.37 +}
    1.38 +
    1.39 +test();
    1.40 +

mercurial