summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/ch10/10.4/10.4.2
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/ch10/10.4/10.4.2')
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-1.js26
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-2.js31
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-3.js34
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-4.js29
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-5.js27
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-c-1.js20
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-s.js18
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-1-s.js21
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-2-s.js22
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-1gs.js17
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-2-s.js19
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-4-s.js18
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2.1_A1.js17
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js28
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js28
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js29
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js29
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js28
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js29
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js29
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js29
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js29
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js29
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js29
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js31
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js32
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js34
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js32
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js32
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js33
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js34
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js34
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js35
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js34
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js34
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/browser.js0
-rw-r--r--js/src/tests/test262/ch10/10.4/10.4.2/shell.js0
37 files changed, 980 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-1.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-1.js
new file mode 100644
index 000000000..233eac2c8
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-1.js
@@ -0,0 +1,26 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch10/10.4/10.4.2/10.4.2-1-1.js
+ * @description Indirect call to eval has context set to global context
+ */
+
+var __10_4_2_1_1_1 = "str";
+function testcase() {
+ try {
+
+ var _eval = eval;
+ var __10_4_2_1_1_1 = "str1";
+ if(_eval("\'str\' === __10_4_2_1_1_1") === true && // indirect eval
+ eval("\'str1\' === __10_4_2_1_1_1") === true) { // direct eval
+ return true;
+ }
+ return false;
+ } finally {
+ delete this.__10_4_2_1_1_1;
+ }
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-2.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-2.js
new file mode 100644
index 000000000..7c144f552
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-2.js
@@ -0,0 +1,31 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch10/10.4/10.4.2/10.4.2-1-2.js
+ * @description Indirect call to eval has context set to global context (nested function)
+ */
+
+var __10_4_2_1_2 = "str";
+function testcase() {
+ try {
+
+ var _eval = eval;
+ var __10_4_2_1_2 = "str1";
+ function foo() {
+ var __10_4_2_1_2 = "str2";
+ if(_eval("\'str\' === __10_4_2_1_2") === true && // indirect eval
+ eval("\'str2\' === __10_4_2_1_2") === true) { // direct eval
+ return true;
+ } else {
+ return false;
+ }
+ }
+ return foo();
+ } finally {
+ delete this.__10_4_2_1_1_2;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-3.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-3.js
new file mode 100644
index 000000000..078ea21ab
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-3.js
@@ -0,0 +1,34 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch10/10.4/10.4.2/10.4.2-1-3.js
+ * @description Indirect call to eval has context set to global context (catch block)
+ */
+
+var __10_4_2_1_3 = "str";
+function testcase() {
+
+ try {
+
+ var _eval = eval;
+ var __10_4_2_1_3 = "str1";
+ try {
+ throw "error";
+ }
+ catch (e) {
+ var __10_4_2_1_3 = "str2";
+ if (_eval("\'str\' === __10_4_2_1_3") === true && // indirect eval
+ eval("\'str2\' === __10_4_2_1_3") === true) { // direct eval
+ return true;
+ } else {
+ return false;
+ }
+ }
+ } finally {
+ delete this.__10_4_2_1_3;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-4.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-4.js
new file mode 100644
index 000000000..8a025f0d9
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-4.js
@@ -0,0 +1,29 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch10/10.4/10.4.2/10.4.2-1-4.js
+ * @description Indirect call to eval has context set to global context (with block)
+ */
+
+var __10_4_2_1_4 = "str";
+function testcase() {
+ try {
+ var o = new Object();
+ o.__10_4_2_1_4 = "str2";
+ var _eval = eval;
+ var __10_4_2_1_4 = "str1";
+ with (o) {
+ if (_eval("\'str\' === __10_4_2_1_4") === true && // indirect eval
+ eval("\'str2\' === __10_4_2_1_4") === true) { // direct eval
+ return true;
+ }
+ }
+ return false;
+ } finally {
+ delete this.__10_4_2_1_4;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-5.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-5.js
new file mode 100644
index 000000000..3808a9988
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-1-5.js
@@ -0,0 +1,27 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch10/10.4/10.4.2/10.4.2-1-5.js
+ * @description Indirect call to eval has context set to global context (inside another eval)
+ */
+
+var __10_4_2_1_5 = "str";
+function testcase() {
+ try {
+
+ var __10_4_2_1_5 = "str1";
+ var r = eval("\
+ var _eval = eval; \
+ var __10_4_2_1_5 = \'str2\'; \
+ _eval(\"\'str\' === __10_4_2_1_5 \") && \
+ eval(\"\'str2\' === __10_4_2_1_5\")\
+ ");
+ return r;
+ } finally {
+ delete this.__10_4_2_1_5;
+ }
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-c-1.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-c-1.js
new file mode 100644
index 000000000..61d85cec0
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-c-1.js
@@ -0,0 +1,20 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch10/10.4/10.4.2/10.4.2-2-c-1.js
+ * @description Direct val code in non-strict mode - can instantiate variable in calling context
+ */
+
+
+function testcase() {
+ var x = 0;
+ return function inner() {
+ eval("var x = 1");
+ if (x === 1)
+ return true;
+ } ();
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-s.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-s.js
new file mode 100644
index 000000000..fb00b04f5
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-2-s.js
@@ -0,0 +1,18 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch10/10.4/10.4.2/10.4.2-2-s.js
+ * @description Strict Mode - Strict mode eval code cannot instantiate functions in the variable environment of the caller to eval
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+ eval("(function fun(x){ return x })(10)");
+ return typeof (fun) === "undefined";
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-1-s.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-1-s.js
new file mode 100644
index 000000000..57ee1912d
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-1-s.js
@@ -0,0 +1,21 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch10/10.4/10.4.2/10.4.2-3-c-1-s.js
+ * @description Direct eval code in strict mode - cannot instantiate variable in the variable environment of the calling context
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ var _10_4_2_3_c_1_s = 0;
+ function _10_4_2_3_c_1_sFunc() {
+ eval("'use strict';var _10_4_2_3_c_1_s = 1");
+ return _10_4_2_3_c_1_s===0;
+ }
+ return _10_4_2_3_c_1_sFunc();
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-2-s.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-2-s.js
new file mode 100644
index 000000000..91caa626b
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2-3-c-2-s.js
@@ -0,0 +1,22 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch10/10.4/10.4.2/10.4.2-3-c-2-s.js
+ * @description Calling code in strict mode - eval cannot instantiate variable in the variable environment of the calling context
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ var _10_4_2_3_c_2_s = 0;
+ function _10_4_2_3_c_2_sFunc() {
+ 'use strict';
+ eval("var _10_4_2_3_c_2_s = 1");
+ return _10_4_2_3_c_2_s===0;
+ }
+ return _10_4_2_3_c_2_sFunc();
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-1gs.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-1gs.js
new file mode 100644
index 000000000..e0d77031f
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-1gs.js
@@ -0,0 +1,17 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+
+/**
+ * @path ch10/10.4/10.4.2/10.4.2.1-1gs.js
+ * @description Strict Mode - eval code cannot instantiate variable in the variable environment of the calling context that invoked the eval if the code of the calling context is strict code
+ * @onlyStrict
+ * @negative ^((?!NotEarlyError).)*$
+ */
+
+"use strict";
+eval("var x = 7;");
+x = 9;
+throw NotEarlyError;
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-2-s.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-2-s.js
new file mode 100644
index 000000000..5fc76cb35
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-2-s.js
@@ -0,0 +1,19 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch10/10.4/10.4.2/10.4.2.1-2-s.js
+ * @description Strict Mode - Strict mode eval code cannot instantiate functions in the variable environment of the caller to eval
+ * @onlyStrict
+ */
+
+
+function testcase() {
+ "use strict";
+
+ eval("function _10_4_2_1_2_fun(){}");
+ return typeof _10_4_2_1_2_fun === "undefined";
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-4-s.js b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-4-s.js
new file mode 100644
index 000000000..89ce85399
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/10.4.2.1-4-s.js
@@ -0,0 +1,18 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch10/10.4/10.4.2/10.4.2.1-4-s.js
+ * @description Strict Mode - Strict mode eval code cannot instantiate functions in the variable environment of the caller to eval which is contained in strict mode code
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ eval("'use strict'; function _10_4_2_1_4_fun(){}");
+ return typeof _10_4_2_1_4_fun === "undefined";
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2.1_A1.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2.1_A1.js
new file mode 100644
index 000000000..3a3690ce9
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2.1_A1.js
@@ -0,0 +1,17 @@
+// Copyright 2011 Google Inc. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * @path ch10/10.4/10.4.2/S10.4.2.1_A1.js
+ * @description Strict indirect eval should not leak top level
+ * declarations into the global scope
+ * @onlyStrict
+ */
+
+"use strict";
+if (!('foo' in this)) {
+ (1,eval)('"use strict"; var foo = 88;');
+ if ('foo' in this) {
+ $ERROR("Strict indirect eval leaked a top level declaration");
+ }
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js
new file mode 100644
index 000000000..077ae7be1
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T1.js
@@ -0,0 +1,28 @@
+// 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_T1.js
+ * @description eval within global execution context
+ */
+
+var i;
+var j;
+str1 = '';
+str2 = '';
+x = 1;
+y = 2;
+
+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");
+}
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js
new file mode 100644
index 000000000..4903b5b3b
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T10.js
@@ -0,0 +1,28 @@
+// 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_T10.js
+ * @description eval within global execution context
+ */
+
+var i;
+var j;
+str1 = '';
+str2 = '';
+var x = 1;
+var y = 2;
+
+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");
+}
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js
new file mode 100644
index 000000000..fb7b1690e
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T11.js
@@ -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_T11.js
+ * @description eval within global execution context
+ */
+
+var i;
+var j;
+str1 = '';
+str2 = '';
+
+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");
+}
+
+this.x = 1;
+this.y = 2;
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js
new file mode 100644
index 000000000..b7eb20df0
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T2.js
@@ -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_T2.js
+ * @description eval within global execution context
+ */
+
+var i;
+var j;
+str1 = '';
+str2 = '';
+
+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");
+}
+
+var x = 1;
+var y = 2;
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js
new file mode 100644
index 000000000..3b32b2bc2
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T3.js
@@ -0,0 +1,28 @@
+// 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_T3.js
+ * @description eval within global execution context
+ */
+
+var i;
+var j;
+str1 = '';
+str2 = '';
+this.x = 1;
+this.y = 2;
+
+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");
+}
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js
new file mode 100644
index 000000000..c5e5d0a04
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T4.js
@@ -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;
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js
new file mode 100644
index 000000000..927a8007d
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T5.js
@@ -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_T5.js
+ * @description eval within global execution context
+ */
+
+var i;
+var j;
+str1 = '';
+str2 = '';
+var 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");
+}
+
+var y = 2;
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js
new file mode 100644
index 000000000..b9fb461f6
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T6.js
@@ -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_T6.js
+ * @description eval within global execution context
+ */
+
+var i;
+var j;
+str1 = '';
+str2 = '';
+this.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");
+}
+
+this.y = 2;
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js
new file mode 100644
index 000000000..93160490c
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T7.js
@@ -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_T7.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");
+}
+
+var y = 2;
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js
new file mode 100644
index 000000000..5376140af
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T8.js
@@ -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_T8.js
+ * @description eval within global execution context
+ */
+
+var i;
+var j;
+str1 = '';
+str2 = '';
+this.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");
+}
+
+var y = 2;
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js
new file mode 100644
index 000000000..76d75b8f9
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.1_T9.js
@@ -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_T9.js
+ * @description eval within global execution context
+ */
+
+var i;
+var j;
+str1 = '';
+str2 = '';
+
+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");
+}
+
+x = 1;
+y = 2;
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js
new file mode 100644
index 000000000..229cfc63f
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T1.js
@@ -0,0 +1,31 @@
+// 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.2_T1.js
+ * @description eval within global execution context
+ */
+
+function f(){
+ var i;
+ var j;
+ str1 = '';
+ str2 = '';
+ x = 1;
+ y = 2;
+
+ for(i in this){
+ str1+=i;
+ }
+
+ eval('for(j in this){\nstr2+=j;\n}');
+ return (str1 === str2);
+}
+
+if(!f()){
+ $ERROR("#1: scope chain must contain same objects in the same order as the calling context");
+}
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js
new file mode 100644
index 000000000..1707379cf
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T10.js
@@ -0,0 +1,32 @@
+// 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.2_T10.js
+ * @description eval within global execution context
+ */
+
+function f(){
+ var i;
+ var j;
+ str1 = '';
+ str2 = '';
+ var x = 1;
+ var y = 2;
+
+ for(i in this){
+ str1+=i;
+ }
+
+ eval('for(j in this){\nstr2+=j;\n}');
+
+ return (str1 === str2);
+}
+
+if(!f()){
+ $ERROR("#1: scope chain must contain same objects in the same order as the calling context");
+}
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js
new file mode 100644
index 000000000..b94f2aa56
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T11.js
@@ -0,0 +1,34 @@
+// 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.2_T11.js
+ * @description eval within global execution context
+ * @noStrict
+ */
+
+function f(){
+ var i;
+ var j;
+ str1 = '';
+ str2 = '';
+
+ for(i in this){
+ str1+=i;
+ }
+
+ eval('for(j in this){\nstr2+=j;\n}');
+
+ return (str1 === str2);
+
+ this.x = 1;
+ this.y = 2;
+}
+
+if(!f()){
+ $ERROR("#1: scope chain must contain same objects in the same order as the calling context");
+}
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js
new file mode 100644
index 000000000..72611dc49
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T2.js
@@ -0,0 +1,32 @@
+// 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.2_T2.js
+ * @description eval within global execution context
+ */
+
+function f(){
+ var i;
+ var j;
+ str1 = '';
+ str2 = '';
+
+ for(i in this){
+ str1+=i;
+ }
+
+ eval('for(j in this){\nstr2+=j;\n}');
+
+ return (str1 === str2);
+ var x = 1;
+ var y = 2;
+}
+
+if(!f()){
+ $ERROR("#1: scope chain must contain same objects in the same order as the calling context");
+}
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js
new file mode 100644
index 000000000..f3cd1b0bf
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T3.js
@@ -0,0 +1,32 @@
+// 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.2_T3.js
+ * @description eval within global execution context
+ */
+
+function f(){
+ var i;
+ var j;
+ str1 = '';
+ str2 = '';
+ this.x = 1;
+ this.y = 2;
+
+ for(i in this){
+ str1+=i;
+ }
+
+ eval('for(j in this){\nstr2+=j;\n}');
+
+ return (str1 === str2);
+}
+
+if(!f()){
+ $ERROR("#1: scope chain must contain same objects in the same order as the calling context");
+}
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js
new file mode 100644
index 000000000..cebe8f3a2
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T4.js
@@ -0,0 +1,33 @@
+// 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.2_T4.js
+ * @description eval within global execution context
+ */
+
+function f(){
+ var i;
+ var j;
+ str1 = '';
+ str2 = '';
+ x = 1;
+
+ for(i in this){
+ str1+=i;
+ }
+
+ eval('for(j in this){\nstr2+=j;\n}');
+
+ return (str1 === str2);
+
+ y = 2;
+}
+
+if(!f()){
+ $ERROR("#1: scope chain must contain same objects in the same order as the calling context");
+}
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js
new file mode 100644
index 000000000..802434849
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T5.js
@@ -0,0 +1,34 @@
+// 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.2_T5.js
+ * @description eval within global execution context
+ */
+
+function f(){
+ var i;
+ var j;
+ str1 = '';
+ str2 = '';
+ var x = 1;
+
+ for(i in this){
+ str1+=i;
+ }
+
+ eval('for(j in this){\nstr2+=j;\n}');
+
+ return (str1 === str2);
+
+ var y = 2;
+}
+
+if(!f()){
+ $ERROR("#1: scope chain must contain same objects in the same order as the calling context");
+}
+
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js
new file mode 100644
index 000000000..275f8ce98
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T6.js
@@ -0,0 +1,34 @@
+// 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.2_T6.js
+ * @description eval within global execution context
+ */
+
+function f(){
+ var i;
+ var j;
+ str1 = '';
+ str2 = '';
+ this.x = 1;
+
+ for(i in this){
+ str1+=i;
+ }
+
+ eval('for(j in this){\nstr2+=j;\n}');
+
+ return (str1 === str2);
+
+ this.y = 2;
+}
+
+if(!f()){
+ $ERROR("#1: scope chain must contain same objects in the same order as the calling context");
+}
+
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js
new file mode 100644
index 000000000..1870bc1fd
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T7.js
@@ -0,0 +1,35 @@
+// 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.2_T7.js
+ * @description eval within global execution context
+ */
+
+function f(){
+ var i;
+ var j;
+ str1 = '';
+ str2 = '';
+ x = 1;
+
+ for(i in this){
+ str1+=i;
+ }
+
+ eval('for(j in this){\nstr2+=j;\n}');
+
+ return (str1 === str2);
+
+ var y = 2;
+}
+
+if(!f()){
+ $ERROR("#1: scope chain must contain same objects in the same order as the calling context");
+}
+
+
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js
new file mode 100644
index 000000000..8f1282460
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T8.js
@@ -0,0 +1,34 @@
+// 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.2_T8.js
+ * @description eval within global execution context
+ */
+
+function f(){
+ var i;
+ var j;
+ str1 = '';
+ str2 = '';
+ this.x = 1;
+
+ for(i in this){
+ str1+=i;
+ }
+
+ eval('for(j in this){\nstr2+=j;\n}');
+
+ return (str1 === str2);
+
+ var y = 2;
+}
+
+if(!f()){
+ $ERROR("#1: scope chain must contain same objects in the same order as the calling context");
+}
+
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js
new file mode 100644
index 000000000..e77ca4323
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/S10.4.2_A1.2_T9.js
@@ -0,0 +1,34 @@
+// 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.2_T9.js
+ * @description eval within global execution context
+ */
+
+function f(){
+ var i;
+ var j;
+ str1 = '';
+ str2 = '';
+
+ for(i in this){
+ str1+=i;
+ }
+
+ eval('for(j in this){\nstr2+=j;\n}');
+
+ return (str1 === str2);
+
+ x = 1;
+ y = 2;
+}
+
+if(!f()){
+ $ERROR("#1: scope chain must contain same objects in the same order as the calling context");
+}
+
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/browser.js b/js/src/tests/test262/ch10/10.4/10.4.2/browser.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/browser.js
diff --git a/js/src/tests/test262/ch10/10.4/10.4.2/shell.js b/js/src/tests/test262/ch10/10.4/10.4.2/shell.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch10/10.4/10.4.2/shell.js