tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

S10.2.3_A2.3_T3.js (2166B)


      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: Global object properties have attributes { DontEnum }
      6 es5id: 10.2.3_A2.3_T3
      7 description: Global execution context - Constructor Properties
      8 ---*/
      9 
     10 var evalStr =
     11 '//CHECK#1\n'+
     12 'for (var x in this) {\n'+
     13 '  if ( x === \'Object\' ) {\n'+
     14 '    throw new Test262Error("#1: \'Object\' have attribute DontEnum");\n'+
     15 '  } else if ( x === \'Function\') {\n'+
     16 '    throw new Test262Error("#1: \'Function\' have attribute DontEnum");\n'+
     17 '  } else if ( x === \'String\' ) {\n'+
     18 '    throw new Test262Error("#1: \'String\' have attribute DontEnum");\n'+
     19 '  } else if ( x === \'Number\' ) {\n'+
     20 '    throw new Test262Error("#1: \'Number\' have attribute DontEnum");\n'+
     21 '  } else if ( x === \'Array\' ) {\n'+
     22 '    throw new Test262Error("#1: \'Array\' have attribute DontEnum");\n'+
     23 '  } else if ( x === \'Boolean\' ) {\n'+
     24 '    throw new Test262Error("#1: \'Boolean\' have attribute DontEnum");\n'+
     25 '  } else if ( x === \'Date\' ) {\n'+
     26 '    throw new Test262Error("#1: \'Date\' have attribute DontEnum");\n'+
     27 '  } else if ( x === \'RegExp\' ) {\n'+
     28 '    throw new Test262Error("#1: \'RegExp\' have attribute DontEnum");\n'+
     29 '  } else if ( x === \'Error\' ) {\n'+
     30 '    throw new Test262Error("#1: \'Error\' have attribute DontEnum");\n'+
     31 '  } else if ( x === \'EvalError\' ) {\n'+
     32 '    throw new Test262Error("#1: \'EvalError\' have attribute DontEnum");\n'+
     33 '  } else if ( x === \'RangeError\' ) {\n'+
     34 '    throw new Test262Error("#1: \'RangeError\' have attribute DontEnum");\n'+
     35 '  } else if ( x === \'ReferenceError\' ) {\n'+
     36 '    throw new Test262Error("#1: \'ReferenceError\' have attribute DontEnum");\n'+
     37 '  } else if ( x === \'SyntaxError\' ) {\n'+
     38 '    throw new Test262Error("#1: \'SyntaxError\' have attribute DontEnum");\n'+
     39 '  } else if ( x === \'TypeError\' ) {\n'+
     40 '    throw new Test262Error("#1: \'TypeError\' have attribute DontEnum");\n'+
     41 '  } else if ( x === \'URIError\' ) {\n'+
     42 '    throw new Test262Error("#1: \'URIError\' have attribute DontEnum");\n'+
     43 '  }\n'+
     44 '}\n';
     45 
     46 eval(evalStr);
     47 
     48 reportCompare(0, 0);