diff -r 000000000000 -r 6474c204b198 js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * The scope chain is initialised to contain the same objects, + * in the same order, as the calling context's scope chain + * + * @path ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js + * @description eval within global execution context + */ + +var i; +var j; +str1 = ''; +str2 = ''; +x = 1; + +for(i in this){ + str1+=i; +} + +eval('for(j in this){\nstr2+=j;\n}'); + +if(!(str1 === str2)){ + $ERROR("#1: scope chain must contain same objects in the same order as the calling context"); +} + +y = 2; +