diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /js/src/tests/test262/ch10/10.4/10.4.3 | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/tests/test262/ch10/10.4/10.4.3')
203 files changed, 3652 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-1-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-1-s.js new file mode 100644 index 000000000..9ed7152e4 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-1-s.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.3/10.4.3-1-1-s.js
+ * @description this is not coerced to an object in strict mode (Number)
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ 'use strict';
+ return typeof(this);
+ }
+
+ function bar()
+ {
+ return typeof(this);
+ }
+
+
+ return foo.call(1) === 'number' && bar.call(1) === 'object';
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10-s.js new file mode 100644 index 000000000..d737cff1a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10-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.3/10.4.3-1-10-s.js
+ * @description Strict Mode - checking 'this' (FunctionExpression includes strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+var f = function () {
+ "use strict";
+ return typeof this;
+}
+return f() === "undefined";
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100-s.js new file mode 100644 index 000000000..98deb941e --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100-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.3/10.4.3-1-100-s.js
+ * @description Strict Mode - checking 'this' (strict function passed as arg to String.prototype.replace from non-strict context)
+ * @onlyStrict
+ */
+
+function testcase() {
+var x = 3;
+
+function f() {
+ "use strict";
+ x = this;
+ return "a";
+}
+return ("ab".replace("b", f)==="aa") && (x===undefined);
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100gs.js new file mode 100644 index 000000000..b78f81660 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-100gs.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.3/10.4.3-1-100gs.js
+ * @description Strict Mode - checking 'this' (strict function passed as arg to String.prototype.replace from non-strict context)
+ * @onlyStrict
+ */
+var x = 3;
+
+function f() {
+ "use strict";
+ x = this;
+ return "a";
+}
+if (("ab".replace("b", f)!=="aa") || (x!==undefined)) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101-s.js new file mode 100644 index 000000000..bb7c2c7a9 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101-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.3/10.4.3-1-101-s.js
+ * @description Strict Mode - checking 'this' (non-strict function passed as arg to String.prototype.replace from strict context)
+ * @noStrict
+ */
+
+function testcase() {
+var x = 3;
+
+function f() {
+ x = this;
+ return "a";
+}
+
+return (function() {"use strict"; return "ab".replace("b", f)==="aa";}()) && (x===fnGlobalObject());
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101gs.js new file mode 100644 index 000000000..bc6eba526 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-101gs.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.3/10.4.3-1-101gs.js
+ * @description Strict Mode - checking 'this' (non-strict function passed as arg to String.prototype.replace from strict context)
+ * @noStrict
+ */
+var x = 3;
+
+function f() {
+ x = this;
+ return "a";
+}
+
+if ( (!(function() {"use strict"; return "ab".replace("b", f)==="aa";}())) || (x!==fnGlobalObject())) {
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102-s.js new file mode 100644 index 000000000..0a11390ef --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102-s.js @@ -0,0 +1,23 @@ +/// 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.3/10.4.3-1-102-s.js
+ * @description Strict Mode - checking 'this' (strict anonymous function passed as arg to String.prototype.replace from non-strict context)
+ * @onlyStrict
+ */
+
+function testcase() {
+var x = 3;
+
+return ("ab".replace("b", (function () {
+ "use strict";
+ return function () {
+ x = this;
+ return "a";
+ }
+ })())==="aa") && (x===undefined);
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102gs.js new file mode 100644 index 000000000..90505a2fd --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-102gs.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.3/10.4.3-1-102gs.js
+ * @description Strict Mode - checking 'this' (strict anonymous function passed as arg to String.prototype.replace from non-strict context)
+ * @onlyStrict
+ */
+var x = 3;
+if ( ("ab".replace("b", (function () {
+ "use strict";
+ return function () {
+ x = this;
+ return "a";
+ }
+ })())!=="aa") || (x!==undefined)) {
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-103.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-103.js new file mode 100644 index 000000000..a0bc90873 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-103.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.3/10.4.3-1-103.js
+ * @description Non strict mode should ToObject thisArg if not an object. Abstract equality operator should succeed.
+ */
+
+function testcase(){
+ Object.defineProperty(Object.prototype, "x", { get: function () { return this; } });
+ if((5).x == 0) return false;
+ if(!((5).x == 5)) return false;
+ return true;
+}
+
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-104.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-104.js new file mode 100644 index 000000000..42f89deb3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-104.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.3/10.4.3-1-104.js
+ * @onlyStrict
+ * @description Strict mode should not ToObject thisArg if not an object. Strict equality operator should succeed.
+ */
+
+
+function testcase(){
+ Object.defineProperty(Object.prototype, "x", { get: function () { "use strict"; return this; } });
+ if(!((5).x === 5)) return false;
+ return true;
+}
+
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-105.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-105.js new file mode 100644 index 000000000..a66b850cf --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-105.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.
+/**
+ * Created based on feedback in https://bugs.ecmascript.org/show_bug.cgi?id=333
+ *
+ * @path ch10/10.4/10.4.3/10.4.3-1-105.js
+ * @description Non strict mode should ToObject thisArg if not an object. Return type should be object and strict equality should fail.
+ */
+
+ function testcase(){
+ Object.defineProperty(Object.prototype, "x", { get: function () { return this; } });
+ if((5).x === 5) return false;
+ if(!(typeof (5).x === "object")) return false;
+ return true;
+}
+
+runTestCase(testcase);
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-106.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-106.js new file mode 100644 index 000000000..36afbda2a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-106.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.
+/**
+ * Created based on feedback in https://bugs.ecmascript.org/show_bug.cgi?id=333
+ *
+ * @path ch10/10.4/10.4.3/10.4.3-1-106.js
+ * @onlyStrict
+ * @description Strict mode should not ToObject thisArg if not an object. Return type should be 'number'.
+ */
+
+ function testcase(){
+ Object.defineProperty(Object.prototype, "x", { get: function () { "use strict"; return this; } });
+ if(!(typeof (5).x === "number")) return false;
+ return true;
+}
+
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10gs.js new file mode 100644 index 000000000..74ee475ae --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-10gs.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.3/10.4.3-1-10gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionExpression includes strict directive prologue)
+ * @onlyStrict
+ */
+
+var f = function () {
+ "use strict";
+ return typeof this;
+}
+if (f() !== "undefined") {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11-s.js new file mode 100644 index 000000000..8f7813338 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11-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.3/10.4.3-1-11-s.js
+ * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+return (function () {
+ return typeof this;
+})() === "undefined";
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11gs.js new file mode 100644 index 000000000..3be7db62a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-11gs.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.3/10.4.3-1-11gs.js
+ * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+if ((function () {
+ return typeof this;
+})() !== "undefined") {
+ throw "'this' had incorrect value!";
+}
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12-s.js new file mode 100644 index 000000000..a88b4c03f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12-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.3/10.4.3-1-12-s.js
+ * @description Strict Mode - checking 'this' (Anonymous FunctionExpression includes strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+return (function () {
+ "use strict";
+ return typeof this;
+})() === "undefined";
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12gs.js new file mode 100644 index 000000000..0bb4a9781 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-12gs.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.3/10.4.3-1-12gs.js
+ * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression includes strict directive prologue)
+ * @onlyStrict
+ */
+
+if ((function () {
+ "use strict";
+ return typeof this;
+})() !== "undefined") {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13-s.js new file mode 100644 index 000000000..c4ebc9d39 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13-s.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.3/10.4.3-1-13-s.js
+ * @description Strict Mode - checking 'this' (Function constructor defined within strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+var f = Function("return typeof this;");
+return f() !== "undefined";
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13gs.js new file mode 100644 index 000000000..d6c4d550a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-13gs.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-13gs.js
+ * @description Strict - checking 'this' from a global scope (Function constructor defined within strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+var f = Function("return typeof this;");
+if (f() === "undefined") {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14-s.js new file mode 100644 index 000000000..fe45b6931 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-14-s.js
+ * @description Strict Mode - checking 'this' (Function constructor includes strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+var f = Function("\"use strict\";\nreturn typeof this;");
+return f() === "undefined";
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14gs.js new file mode 100644 index 000000000..cec5e66d8 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-14gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-14gs.js
+ * @description Strict - checking 'this' from a global scope (Function constructor includes strict directive prologue)
+ * @onlyStrict
+ */
+
+var f = Function("\"use strict\";\nreturn typeof this;");
+if (f() !== "undefined") {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15-s.js new file mode 100644 index 000000000..961d55b6d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15-s.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.3/10.4.3-1-15-s.js
+ * @description Strict Mode - checking 'this' (New'ed Function constructor defined within strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+var f = new Function("return typeof this;");
+return f() !== "undefined";
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15gs.js new file mode 100644 index 000000000..26d75fa64 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-15gs.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-15gs.js
+ * @description Strict - checking 'this' from a global scope (New'ed Function constructor defined within strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+var f = new Function("return typeof this;");
+if (f() === "undefined") {
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16-s.js new file mode 100644 index 000000000..6167f4c4a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-16-s.js
+ * @description Strict Mode - checking 'this' (New'ed Function constructor includes strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+var f = new Function("\"use strict\";\nreturn typeof this;");
+return f() === "undefined";
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16gs.js new file mode 100644 index 000000000..b7a2287e7 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-16gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-16gs.js
+ * @description Strict - checking 'this' from a global scope (New'ed Function constructor includes strict directive prologue)
+ * @onlyStrict
+ */
+
+var f = new Function("\"use strict\";\nreturn typeof this;");
+if (f() !== "undefined") {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17-s.js new file mode 100644 index 000000000..4d2caf063 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-17-s.js
+ * @description Strict Mode - checking 'this' (eval used within strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+return (eval("typeof this") === "undefined") && (eval("this") !== fnGlobalObject());
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17gs.js new file mode 100644 index 000000000..f583c6e89 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-17gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-17gs.js
+ * @description Strict - checking 'this' from a global scope (eval used within strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+if (eval("this") !== fnGlobalObject()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-18gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-18gs.js new file mode 100644 index 000000000..e1d35e497 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-18gs.js @@ -0,0 +1,14 @@ +/// 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.3/10.4.3-1-18gs.js
+ * @description Strict - checking 'this' from a global scope (eval includes strict directive prologue)
+ * @onlyStrict
+ */
+
+if (eval("\"use strict\";\nthis") !== fnGlobalObject()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19-s.js new file mode 100644 index 000000000..c2d412838 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19-s.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.3/10.4.3-1-19-s.js
+ * @description Strict Mode - checking 'this' (indirect eval used within strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+var my_eval = eval;
+return my_eval("this") === fnGlobalObject();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19gs.js new file mode 100644 index 000000000..2d1c35edc --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-19gs.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-19gs.js
+ * @description Strict - checking 'this' from a global scope (indirect eval used within strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+var my_eval = eval;
+if (my_eval("this") !== fnGlobalObject()) {
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-2-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-2-s.js new file mode 100644 index 000000000..0efe7fd65 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-2-s.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.3/10.4.3-1-2-s.js
+ * @description this is not coerced to an object in strict mode (string)
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ 'use strict';
+ return typeof(this);
+ }
+
+ function bar()
+ {
+ return typeof(this);
+ }
+
+
+ return foo.call('1') === 'string' && bar.call('1') === 'object';
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20-s.js new file mode 100644 index 000000000..869bc53e4 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-20-s.js
+ * @description Strict Mode - checking 'this' (indirect eval includes strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+var my_eval = eval;
+return my_eval("\"use strict\";\nthis") === fnGlobalObject();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20gs.js new file mode 100644 index 000000000..48544cb0e --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-20gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-20gs.js
+ * @description Strict - checking 'this' from a global scope (indirect eval includes strict directive prologue)
+ * @onlyStrict
+ */
+
+var my_eval = eval;
+if (my_eval("\"use strict\";\nthis") !== fnGlobalObject() ) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21-s.js new file mode 100644 index 000000000..915f54ce8 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21-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.3/10.4.3-1-21-s.js
+ * @description Strict Mode - checking 'this' (New'ed object from FunctionDeclaration defined within strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+function f() {
+ return this;
+}
+return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined");
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21gs.js new file mode 100644 index 000000000..b12634049 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-21gs.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.3/10.4.3-1-21gs.js
+ * @description Strict - checking 'this' from a global scope (New'ed object from FunctionDeclaration defined within strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+function f() {
+ return this;
+}
+if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) {
+ throw "'this' had incorrect value!";
+}
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22-s.js new file mode 100644 index 000000000..55d66e60c --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22-s.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.3/10.4.3-1-22-s.js
+ * @description Strict Mode - checking 'this' (New'ed object from FunctionDeclaration includes strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() {
+ "use strict";
+ return this;
+}
+return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined");
+
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22gs.js new file mode 100644 index 000000000..1abde0e2f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-22gs.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.3/10.4.3-1-22gs.js
+ * @description Strict - checking 'this' from a global scope (New'ed object from FunctionDeclaration includes strict directive prologue)
+ * @onlyStrict
+ */
+
+function f() {
+ "use strict";
+ return this;
+}
+if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) {
+ throw "'this' had incorrect value!";
+}
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23-s.js new file mode 100644 index 000000000..b2c40be4f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23-s.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.3/10.4.3-1-23-s.js
+ * @description Strict Mode - checking 'this' (New'ed object from FunctionExpression defined within strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+var f = function () {
+ return this;
+}
+return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined");
+
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23gs.js new file mode 100644 index 000000000..4aab84291 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-23gs.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.3/10.4.3-1-23gs.js
+ * @description Strict - checking 'this' from a global scope (New'ed object from FunctionExpression defined within strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+var f = function () {
+ return this;
+}
+if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) {
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24-s.js new file mode 100644 index 000000000..3499abe4d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24-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.3/10.4.3-1-24-s.js
+ * @description Strict Mode - checking 'this' (New'ed object from FunctionExpression includes strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+var f = function () {
+ "use strict";
+ return this;
+}
+return ( (new f())!==fnGlobalObject()) && (typeof (new f()) !== "undefined");
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24gs.js new file mode 100644 index 000000000..38d5e1490 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-24gs.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.3/10.4.3-1-24gs.js
+ * @description Strict - checking 'this' from a global scope (New'ed object from FunctionExpression includes strict directive prologue)
+ * @onlyStrict
+ */
+
+var f = function () {
+ "use strict";
+ return this;
+}
+if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25-s.js new file mode 100644 index 000000000..138802f64 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25-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.3/10.4.3-1-25-s.js
+ * @description Strict Mode - checking 'this' (New'ed object from Anonymous FunctionExpression defined within strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+var obj = new (function () {
+ return this;
+});
+return (obj !== fnGlobalObject()) && ((typeof obj) !== "undefined");
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25gs.js new file mode 100644 index 000000000..30ac917cb --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-25gs.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.3/10.4.3-1-25gs.js
+ * @description Strict - checking 'this' from a global scope (New'ed object from Anonymous FunctionExpression defined within strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+var obj = new (function () {
+ return this;
+});
+if ((obj === fnGlobalObject()) || (typeof obj === "undefined")) {
+ throw "'this' had incorrect value!";
+}
+
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26-s.js new file mode 100644 index 000000000..a015f4082 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26-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.3/10.4.3-1-26-s.js
+ * @description Strict Mode - checking 'this' (New'ed object from Anonymous FunctionExpression includes strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+var obj = new (function () {
+ "use strict";
+ return this;
+});
+return (obj !== fnGlobalObject()) && ((typeof obj) !== "undefined");
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26gs.js new file mode 100644 index 000000000..e19bce342 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-26gs.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.3/10.4.3-1-26gs.js
+ * @description Strict - checking 'this' from a global scope (New'ed object from Anonymous FunctionExpression includes strict directive prologue)
+ * @onlyStrict
+ */
+
+var obj = new (function () {
+ "use strict";
+ return this;
+});
+if ((obj === fnGlobalObject()) || (typeof obj === "undefined")) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27-s.js new file mode 100644 index 000000000..54eda820f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27-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.3/10.4.3-1-27-s.js
+ * @description Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionDeclaration inside strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+function f1() {
+ function f() {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27gs.js new file mode 100644 index 000000000..0cb1cb4f2 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-27gs.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.3/10.4.3-1-27gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within a FunctionDeclaration inside strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+function f1() {
+ function f() {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28-s.js new file mode 100644 index 000000000..c2a5578a8 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28-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.3/10.4.3-1-28-s.js
+ * @description Strict Mode - checking 'this' (FunctionExpression defined within a FunctionDeclaration inside strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+function f1() {
+ var f = function () {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28gs.js new file mode 100644 index 000000000..663a18e00 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-28gs.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.3/10.4.3-1-28gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionExpression defined within a FunctionDeclaration inside strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+function f1() {
+ var f = function () {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29-s.js new file mode 100644 index 000000000..87ea431d7 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29-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.3/10.4.3-1-29-s.js
+ * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionDeclaration inside strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+function f1() {
+ return ((function () {
+ return typeof this;
+ })()==="undefined") && ((typeof this)==="undefined");
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29gs.js new file mode 100644 index 000000000..416f1b4f3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-29gs.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.3/10.4.3-1-29gs.js
+ * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within a FunctionDeclaration inside strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+function f1() {
+ return ((function () {
+ return typeof this;
+ })()==="undefined") && ((typeof this)==="undefined");
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-3-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-3-s.js new file mode 100644 index 000000000..19bafdcff --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-3-s.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.3/10.4.3-1-3-s.js
+ * @description this is not coerced to an object in strict mode (undefined)
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ 'use strict';
+ return typeof(this);
+ }
+
+ function bar()
+ {
+ return typeof(this);
+ }
+ return foo.call(undefined) === 'undefined' && bar.call() === 'object';
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30-s.js new file mode 100644 index 000000000..b4085931b --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30-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.3/10.4.3-1-30-s.js
+ * @description Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionExpression inside strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+var f1 = function () {
+ function f() {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30gs.js new file mode 100644 index 000000000..ab3c6222d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-30gs.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.3/10.4.3-1-30gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within a FunctionExpression inside strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+var f1 = function () {
+ function f() {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31-s.js new file mode 100644 index 000000000..dc32ca19e --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31-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.3/10.4.3-1-31-s.js
+ * @description Strict Mode - checking 'this' (FunctionExpression defined within a FunctionExpression inside strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+var f1 = function () {
+ var f = function () {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31gs.js new file mode 100644 index 000000000..1bbb2d161 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-31gs.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.3/10.4.3-1-31gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionExpression defined within a FunctionExpression inside strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+var f1 = function () {
+ var f = function () {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32-s.js new file mode 100644 index 000000000..4ba988920 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32-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.3/10.4.3-1-32-s.js
+ * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionExpression inside strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+var f1 = function () {
+ return ((function () {
+ return typeof this;
+ })()==="undefined") && ((typeof this)==="undefined");
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32gs.js new file mode 100644 index 000000000..1cd2ad05a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-32gs.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.3/10.4.3-1-32gs.js
+ * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within a FunctionExpression inside strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+var f1 = function () {
+ return ((function () {
+ return typeof this;
+ })()==="undefined") && ((typeof this)==="undefined");
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33-s.js new file mode 100644 index 000000000..6c4d66e2e --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33-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.3/10.4.3-1-33-s.js
+ * @description Strict Mode - checking 'this' (FunctionDeclaration defined within an Anonymous FunctionExpression inside strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+return (function () {
+ function f() {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33gs.js new file mode 100644 index 000000000..c288566cb --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-33gs.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.3/10.4.3-1-33gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within an Anonymous FunctionExpression inside strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+if (! ((function () {
+ function f() {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+})())) {
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34-s.js new file mode 100644 index 000000000..9cf25b53d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34-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.3/10.4.3-1-34-s.js
+ * @description Strict Mode - checking 'this' (FunctionExpression defined within an Anonymous FunctionExpression inside strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+return (function () {
+ var f = function () {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34gs.js new file mode 100644 index 000000000..72980aa41 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-34gs.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.3/10.4.3-1-34gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionExpression defined within an Anonymous FunctionExpression inside strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+if (! ((function () {
+ var f = function () {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+})())) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35-s.js new file mode 100644 index 000000000..8f7abb36f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35-s.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.3/10.4.3-1-35-s.js
+ * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within an Anonymous FunctionExpression inside strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+return (function () {
+ return ((function () {
+ return typeof this;
+ })()==="undefined") && ((typeof this)==="undefined");
+})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35gs.js new file mode 100644 index 000000000..ecee18fe3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-35gs.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.3/10.4.3-1-35gs.js
+ * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within an Anonymous FunctionExpression inside strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+if (! ((function () {
+ return ((function () {
+ return typeof this;
+ })()==="undefined") && ((typeof this)==="undefined");
+})())) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36-s.js new file mode 100644 index 000000000..08bea7cc4 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36-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.3/10.4.3-1-36-s.js
+ * @description Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionDeclaration with a strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+function f1() {
+ "use strict";
+ function f() {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36gs.js new file mode 100644 index 000000000..88fab9f20 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-36gs.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.3/10.4.3-1-36gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within a FunctionDeclaration with a strict directive prologue)
+ * @onlyStrict
+ */
+
+function f1() {
+ "use strict";
+ function f() {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37-s.js new file mode 100644 index 000000000..93e7fde28 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37-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.3/10.4.3-1-37-s.js
+ * @description Strict Mode - checking 'this' (FunctionExpression defined within a FunctionDeclaration with a strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+function f1() {
+ "use strict";
+ var f = function () {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37gs.js new file mode 100644 index 000000000..795b6032d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-37gs.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.3/10.4.3-1-37gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionExpression defined within a FunctionDeclaration with a strict directive prologue)
+ * @onlyStrict
+ */
+
+function f1() {
+ "use strict";
+ var f = function () {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38-s.js new file mode 100644 index 000000000..f496d4ed0 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38-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.3/10.4.3-1-38-s.js
+ * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionDeclaration with a strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+function f1() {
+ "use strict";
+ return ((function () {
+ return typeof this;
+ })()==="undefined") && ((typeof this)==="undefined");
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38gs.js new file mode 100644 index 000000000..1c00b742e --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-38gs.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.3/10.4.3-1-38gs.js
+ * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within a FunctionDeclaration with a strict directive prologue)
+ * @onlyStrict
+ */
+
+function f1() {
+ "use strict";
+ return ((function () {
+ return typeof this;
+ })()==="undefined") && ((typeof this)==="undefined");
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39-s.js new file mode 100644 index 000000000..22478bc26 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39-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.3/10.4.3-1-39-s.js
+ * @description Strict Mode - checking 'this' (FunctionDeclaration defined within a FunctionExpression with a strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+var f1 = function () {
+ "use strict";
+ function f() {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39gs.js new file mode 100644 index 000000000..7ec3adf91 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-39gs.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.3/10.4.3-1-39gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within a FunctionExpression with a strict directive prologue)
+ * @onlyStrict
+ */
+
+var f1 = function () {
+ "use strict";
+ function f() {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-4-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-4-s.js new file mode 100644 index 000000000..28bd8f059 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-4-s.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.3/10.4.3-1-4-s.js
+ * @description this is not coerced to an object in strict mode (boolean)
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ 'use strict';
+ return typeof(this);
+ }
+
+ function bar()
+ {
+ return typeof(this);
+ }
+
+
+ return foo.call(true) === 'boolean' && bar.call(true) === 'object';
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40-s.js new file mode 100644 index 000000000..b90817f63 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40-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.3/10.4.3-1-40-s.js
+ * @description Strict Mode - checking 'this' (FunctionExpression defined within a FunctionExpression with a strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+var f1 = function () {
+ "use strict";
+ var f = function () {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40gs.js new file mode 100644 index 000000000..2d8fbf0ba --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-40gs.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.3/10.4.3-1-40gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionExpression defined within a FunctionExpression with a strict directive prologue)
+ * @onlyStrict
+ */
+
+var f1 = function () {
+ "use strict";
+ var f = function () {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41-s.js new file mode 100644 index 000000000..48495e392 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41-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.3/10.4.3-1-41-s.js
+ * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within a FunctionExpression with a strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+var f1 = function () {
+ "use strict";
+ return ((function () {
+ return typeof this;
+ })()==="undefined") && ((typeof this)==="undefined");
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41gs.js new file mode 100644 index 000000000..43cba61c8 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-41gs.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.3/10.4.3-1-41gs.js
+ * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within a FunctionExpression with a strict directive prologue)
+ * @onlyStrict
+ */
+
+var f1 = function () {
+ "use strict";
+ return ((function () {
+ return typeof this;
+ })()==="undefined") && ((typeof this)==="undefined");
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42-s.js new file mode 100644 index 000000000..c4f705857 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42-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.3/10.4.3-1-42-s.js
+ * @description Strict Mode - checking 'this' (FunctionDeclaration defined within an Anonymous FunctionExpression with a strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+return (function () {
+ "use strict";
+ function f() {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42gs.js new file mode 100644 index 000000000..b1802bf16 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-42gs.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.3/10.4.3-1-42gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within an Anonymous FunctionExpression with a strict directive prologue)
+ * @onlyStrict
+ */
+
+if (! ((function () {
+ "use strict";
+ function f() {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+})())) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43-s.js new file mode 100644 index 000000000..6575e56b9 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43-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.3/10.4.3-1-43-s.js
+ * @description Strict Mode - checking 'this' (FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+return (function () {
+ "use strict";
+ var f = function () {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43gs.js new file mode 100644 index 000000000..0da4b7871 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-43gs.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.3/10.4.3-1-43gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue)
+ * @onlyStrict
+ */
+
+if (! ((function () {
+ "use strict";
+ var f = function () {
+ return typeof this;
+ }
+ return (f()==="undefined") && ((typeof this)==="undefined");
+})())) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44-s.js new file mode 100644 index 000000000..b7ac11d8d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44-s.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.3/10.4.3-1-44-s.js
+ * @description Strict Mode - checking 'this' (Anonymous FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+return (function () {
+ "use strict";
+ return ((function () {
+ return typeof this;
+ })()==="undefined") && ((typeof this)==="undefined");
+})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44gs.js new file mode 100644 index 000000000..2300e4acb --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-44gs.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.3/10.4.3-1-44gs.js
+ * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression defined within an Anonymous FunctionExpression with a strict directive prologue)
+ * @onlyStrict
+ */
+
+if (! ((function () {
+ "use strict";
+ return ((function () {
+ return typeof this;
+ })()==="undefined") && ((typeof this)==="undefined");
+})())) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45-s.js new file mode 100644 index 000000000..e23f9fef0 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45-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.3/10.4.3-1-45-s.js
+ * @description Strict Mode - checking 'this' (FunctionDeclaration with a strict directive prologue defined within a FunctionDeclaration)
+ * @noStrict
+ */
+
+function testcase() {
+function f1() {
+ function f() {
+ "use strict";
+ return typeof this;
+ }
+ return (f()==="undefined") && (this===fnGlobalObject());
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45gs.js new file mode 100644 index 000000000..ce99d6574 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-45gs.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.3/10.4.3-1-45gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionDeclaration with a strict directive prologue defined within a FunctionDeclaration)
+ * @noStrict
+ */
+
+function f1() {
+ function f() {
+ "use strict";
+ return typeof this;
+ }
+ return (f()==="undefined") && (this===fnGlobalObject());
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46-s.js new file mode 100644 index 000000000..5945b2b21 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46-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.3/10.4.3-1-46-s.js
+ * @description Strict Mode - checking 'this' (FunctionExpression with a strict directive prologue defined within a FunctionDeclaration)
+ * @noStrict
+ */
+
+function testcase() {
+function f1() {
+ var f = function () {
+ "use strict";
+ return typeof this;
+ }
+ return (f()==="undefined") && (this===fnGlobalObject());
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46gs.js new file mode 100644 index 000000000..3d0ddd895 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-46gs.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.3/10.4.3-1-46gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionExpression with a strict directive prologue defined within a FunctionDeclaration)
+ * @noStrict
+ */
+
+function f1() {
+ var f = function () {
+ "use strict";
+ return typeof this;
+ }
+ return (f()==="undefined") && (this===fnGlobalObject());
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47-s.js new file mode 100644 index 000000000..6a5fe9d40 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47-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.3/10.4.3-1-47-s.js
+ * @description Strict Mode - checking 'this' (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionDeclaration)
+ * @noStrict
+ */
+
+function testcase() {
+function f1() {
+ return ((function () {
+ "use strict";
+ return typeof this;
+ })()==="undefined") && (this===fnGlobalObject());
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47gs.js new file mode 100644 index 000000000..78884f8c6 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-47gs.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.3/10.4.3-1-47gs.js
+ * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionDeclaration)
+ * @noStrict
+ */
+
+function f1() {
+ return ((function () {
+ "use strict";
+ return typeof this;
+ })()==="undefined") && (this===fnGlobalObject());
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48-s.js new file mode 100644 index 000000000..3c4d49af4 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48-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.3/10.4.3-1-48-s.js
+ * @description Strict Mode - checking 'this' (FunctionDeclaration with a strict directive prologue defined within a FunctionExpression)
+ * @noStrict
+ */
+
+function testcase() {
+var f1 = function () {
+ function f() {
+ "use strict";
+ return typeof this;
+ }
+ return (f()==="undefined") && (this===fnGlobalObject());
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48gs.js new file mode 100644 index 000000000..b6d619176 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-48gs.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.3/10.4.3-1-48gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionDeclaration with a strict directive prologue defined within a FunctionExpression)
+ * @noStrict
+ */
+
+var f1 = function () {
+ function f() {
+ "use strict";
+ return typeof this;
+ }
+ return (f()==="undefined") && (this===fnGlobalObject());
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49-s.js new file mode 100644 index 000000000..3ae616eaa --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49-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.3/10.4.3-1-49-s.js
+ * @description Strict Mode - checking 'this' (FunctionExpression with a strict directive prologue defined within a FunctionExpression)
+ * @noStrict
+ */
+
+function testcase() {
+var f1 = function () {
+ var f = function () {
+ "use strict";
+ return typeof this;
+ }
+ return (f()==="undefined") && (this===fnGlobalObject());
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49gs.js new file mode 100644 index 000000000..d6aee3a91 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-49gs.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.3/10.4.3-1-49gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionExpression with a strict directive prologue defined within a FunctionExpression)
+ * @noStrict
+ */
+
+var f1 = function () {
+ var f = function () {
+ "use strict";
+ return typeof this;
+ }
+ return (f()==="undefined") && (this===fnGlobalObject());
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-5-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-5-s.js new file mode 100644 index 000000000..5d64cea6b --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-5-s.js @@ -0,0 +1,32 @@ +/// 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.3/10.4.3-1-5-s.js
+ * @description this is not coerced to an object in strict mode (function)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ 'use strict';
+ return typeof(this);
+ }
+
+ function bar()
+ {
+ return typeof(this);
+ }
+
+ function foobar()
+ {
+ }
+
+ return foo.call(foobar) === 'function' && bar.call(foobar) === 'function';
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50-s.js new file mode 100644 index 000000000..ad273ecb1 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50-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.3/10.4.3-1-50-s.js
+ * @description Strict Mode - checking 'this' (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionExpression)
+ * @noStrict
+ */
+
+function testcase() {
+var f1 = function () {
+ return ((function () {
+ "use strict";
+ return typeof this;
+ })()==="undefined") && (this===fnGlobalObject());
+}
+return f1();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50gs.js new file mode 100644 index 000000000..21cd879ef --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-50gs.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.3/10.4.3-1-50gs.js
+ * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionExpression)
+ * @noStrict
+ */
+
+var f1 = function () {
+ return ((function () {
+ "use strict";
+ return typeof this;
+ })()==="undefined") && (this===fnGlobalObject());
+}
+if (! f1()) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51-s.js new file mode 100644 index 000000000..e8935366e --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51-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.3/10.4.3-1-51-s.js
+ * @description Strict Mode - checking 'this' (FunctionDeclaration with a strict directive prologue defined within an Anonymous FunctionExpression)
+ * @noStrict
+ */
+
+function testcase() {
+return (function () {
+ function f() {
+ "use strict";
+ return typeof this;
+ }
+ return (f()==="undefined") && (this===fnGlobalObject());
+})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51gs.js new file mode 100644 index 000000000..52f8e35a6 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-51gs.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.3/10.4.3-1-51gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionDeclaration with a strict directive prologue defined within an Anonymous FunctionExpression)
+ * @noStrict
+ */
+
+if (! ((function () {
+ function f() {
+ "use strict";
+ return typeof this;
+ }
+ return (f()==="undefined") && (this===fnGlobalObject());
+})())) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52-s.js new file mode 100644 index 000000000..b2c3a0082 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52-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.3/10.4.3-1-52-s.js
+ * @description Strict Mode - checking 'this' (FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression)
+ * @noStrict
+ */
+
+function testcase() {
+return (function () {
+ var f = function () {
+ "use strict";
+ return typeof this;
+ }
+ return (f()==="undefined") && (this===fnGlobalObject());
+})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52gs.js new file mode 100644 index 000000000..cc617750d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-52gs.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.3/10.4.3-1-52gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression)
+ * @noStrict
+ */
+
+if (! ((function () {
+ var f = function () {
+ "use strict";
+ return typeof this;
+ }
+ return (f()==="undefined") && (this===fnGlobalObject());
+})())) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53-s.js new file mode 100644 index 000000000..2324bf44f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53-s.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.3/10.4.3-1-53-s.js
+ * @description Strict Mode - checking 'this' (Anonymous FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression)
+ * @noStrict
+ */
+
+function testcase() {
+return (function () {
+ return ((function () {
+ "use strict";
+ return typeof this;
+ })()==="undefined") && (this===fnGlobalObject());
+})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53gs.js new file mode 100644 index 000000000..0c6581f2e --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-53gs.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.3/10.4.3-1-53gs.js
+ * @description Strict - checking 'this' from a global scope (Anonymous FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression)
+ * @noStrict
+ */
+
+if (! ((function () {
+ return ((function () {
+ "use strict";
+ return typeof this;
+ })()==="undefined") && (this===fnGlobalObject());
+})())) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54-s.js new file mode 100644 index 000000000..ac481d610 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54-s.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.3/10.4.3-1-54-s.js
+ * @description Strict Mode - checking 'this' (Literal getter defined within strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+var o = { get foo() { return this; } }
+return o.foo===o;
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54gs.js new file mode 100644 index 000000000..571ad634e --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-54gs.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-54gs.js
+ * @description Strict - checking 'this' from a global scope (Literal getter defined within strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+var o = { get foo() { return this; } }
+if (o.foo!==o) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55-s.js new file mode 100644 index 000000000..49acc2d11 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-55-s.js
+ * @description Strict Mode - checking 'this' (Literal getter includes strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+var o = { get foo() { "use strict"; return this; } }
+return o.foo===o;
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55gs.js new file mode 100644 index 000000000..ab3ccbbc5 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-55gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-55gs.js
+ * @description Strict - checking 'this' from a global scope (Literal getter includes strict directive prologue)
+ * @onlyStrict
+ */
+
+var o = { get foo() { "use strict"; return this; } }
+if (o.foo!==o) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56-s.js new file mode 100644 index 000000000..1a492c462 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56-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.3/10.4.3-1-56-s.js
+ * @description Strict Mode - checking 'this' (Literal setter defined within strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+var x = 2;
+var o = { set foo(stuff) { x=this; } }
+o.foo = 3;
+return x===o;
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56gs.js new file mode 100644 index 000000000..7ea7c7a3f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-56gs.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.3/10.4.3-1-56gs.js
+ * @description Strict - checking 'this' from a global scope (Literal setter defined within strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+var x = 2;
+var o = { set foo(stuff) { x=this; } }
+o.foo = 3;
+if (x!==o) {
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57-s.js new file mode 100644 index 000000000..bcd4ef62c --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57-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.3/10.4.3-1-57-s.js
+ * @description Strict Mode - checking 'this' (Literal setter includes strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+var x = 2;
+var o = { set foo(stuff) { "use strict"; x=this; } }
+o.foo = 3;
+return x===o;
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57gs.js new file mode 100644 index 000000000..e59df3357 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-57gs.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.3/10.4.3-1-57gs.js
+ * @description Strict - checking 'this' from a global scope (Literal setter includes strict directive prologue)
+ * @onlyStrict
+ */
+
+var x = 2;
+var o = { set foo(stuff) { "use strict"; x=this; } }
+o.foo = 3;
+if (x!==o) {
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58-s.js new file mode 100644 index 000000000..964f8d435 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58-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.3/10.4.3-1-58-s.js
+ * @description Strict Mode - checking 'this' (Injected getter defined within strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+var o = {};
+Object.defineProperty(o, "foo", { get: function() { return this; } });
+return o.foo===o;
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58gs.js new file mode 100644 index 000000000..166e44079 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-58gs.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.3/10.4.3-1-58gs.js
+ * @description Strict - checking 'this' from a global scope (Injected getter defined within strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+var o = {};
+Object.defineProperty(o, "foo", { get : function() { return this; } });
+if (o.foo!==o) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59-s.js new file mode 100644 index 000000000..7d0afddf5 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59-s.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.3/10.4.3-1-59-s.js
+ * @description Strict Mode - checking 'this' (Injected getter includes strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+var o = {};
+Object.defineProperty(o, "foo", { get: function() { "use strict"; return this; } });
+return o.foo===o;
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59gs.js new file mode 100644 index 000000000..09e1d0648 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-59gs.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-59gs.js
+ * @description Strict - checking 'this' from a global scope (Injected getter includes strict directive prologue)
+ * @onlyStrict
+ */
+
+var o = {};
+Object.defineProperty(o, "foo", { get: function() { "use strict"; return this; } });
+if (o.foo!==o) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60-s.js new file mode 100644 index 000000000..1bd803bee --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60-s.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.3/10.4.3-1-60-s.js
+ * @description Strict Mode - checking 'this' (Injected setter defined within strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+var o = {};
+var x = 2;
+Object.defineProperty(o, "foo", { set: function(stuff) { x=this; } });
+o.foo = 3;
+return x===o;
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60gs.js new file mode 100644 index 000000000..09053dbd1 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-60gs.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.3/10.4.3-1-60gs.js
+ * @description Strict - checking 'this' from a global scope (Injected setter defined within strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+var o = {};
+var x = 2;
+Object.defineProperty(o, "foo", { set: function(stuff) { x=this; } });
+o.foo = 3;
+if (x!==o) {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61-s.js new file mode 100644 index 000000000..23586b250 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61-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.3/10.4.3-1-61-s.js
+ * @description Strict Mode - checking 'this' (Injected setter includes strict directive prologue)
+ * @onlyStrict
+ */
+
+function testcase() {
+var o = {};
+var x = 2;
+Object.defineProperty(o, "foo", { set: function(stuff) { "use strict"; x=this; } });
+o.foo = 3;
+return x===o;
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61gs.js new file mode 100644 index 000000000..2d31c32d8 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-61gs.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.3/10.4.3-1-61gs.js
+ * @description Strict - checking 'this' from a global scope (Injected setter includes strict directive prologue)
+ * @onlyStrict
+ */
+
+var o = {};
+var x = 2;
+Object.defineProperty(o, "foo", { set: function(stuff) { "use strict"; x=this; } });
+o.foo = 3;
+if (x!==o) {
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62-s.js new file mode 100644 index 000000000..a2e3c0bb8 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62-s.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.3/10.4.3-1-62-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by non-strict function declaration)
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() { "use strict"; return this;};
+function foo() { return f();}
+return foo()===undefined;
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62gs.js new file mode 100644 index 000000000..9cd2ae0e7 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-62gs.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-62gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by non-strict function declaration)
+ * @onlyStrict
+ */
+
+function f() { "use strict"; return this;};
+function foo() { return f();}
+if (foo()!==undefined){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63-s.js new file mode 100644 index 000000000..5b93d280b --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-63-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by non-strict eval)
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() { "use strict"; return this===undefined;};
+return eval("f();");
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63gs.js new file mode 100644 index 000000000..07f7a9cee --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-63gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-63gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by non-strict eval)
+ * @onlyStrict
+ */
+
+function f() { "use strict"; return this===undefined;};
+if (! eval("f();")){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64-s.js new file mode 100644 index 000000000..ddb042449 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-64-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by non-strict Function constructor)
+ * @onlyStrict
+ */
+
+function testcase() {
+fnGlobalObject().f = function() { "use strict"; return this===undefined;};
+return Function("return f();")();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64gs.js new file mode 100644 index 000000000..6877c8341 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-64gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-64gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by non-strict Function constructor)
+ * @onlyStrict
+ */
+
+function f() { "use strict"; return this===undefined;};
+if (! (Function("return f();")())){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65-s.js new file mode 100644 index 000000000..5b0f20a65 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-65-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by non-strict new'ed Function constructor)
+ * @onlyStrict
+ */
+
+function testcase() {
+fnGlobalObject().f = function() { "use strict"; return this===undefined;};
+return (new Function("return f();"))();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65gs.js new file mode 100644 index 000000000..567a12360 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-65gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-65gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by non-strict new'ed Function constructor)
+ * @onlyStrict
+ */
+
+function f() { "use strict"; return this===undefined;};
+if (! ( (new Function("return f();")) () )){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66-s.js new file mode 100644 index 000000000..3b4401827 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-66-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply())
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() { "use strict"; return this===undefined;};
+return f.apply();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66gs.js new file mode 100644 index 000000000..29a609b7a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-66gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-66gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply())
+ * @onlyStrict
+ */
+
+function f() { "use strict"; return this===undefined;};
+if (! f.apply()){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67-s.js new file mode 100644 index 000000000..baf57dc0c --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-67-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply(null))
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() { "use strict"; return this===null;};
+return f.apply(null);
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67gs.js new file mode 100644 index 000000000..9122b9fde --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-67gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-67gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply(null))
+ * @onlyStrict
+ */
+
+function f() { "use strict"; return this===null;};
+if (! f.apply(null)){
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68-s.js new file mode 100644 index 000000000..10a5294e1 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-68-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply(undefined))
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() { "use strict"; return this===undefined;};
+return f.apply(undefined);
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68gs.js new file mode 100644 index 000000000..5bfeee3f0 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-68gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-68gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply(undefined))
+ * @onlyStrict
+ */
+
+function f() { "use strict"; return this===undefined;};
+if (! f.apply(undefined)){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69-s.js new file mode 100644 index 000000000..8db3b94ce --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69-s.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.3/10.4.3-1-69-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply(someObject))
+ * @onlyStrict
+ */
+
+function testcase() {
+var o = {};
+function f() { "use strict"; return this===o;};
+return f.apply(o);
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69gs.js new file mode 100644 index 000000000..f32b45575 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-69gs.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-69gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply(someObject))
+ * @onlyStrict
+ */
+
+var o = {};
+function f() { "use strict"; return this===o;};
+if (! f.apply(o)){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7-s.js new file mode 100644 index 000000000..ae370f766 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7-s.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.3/10.4.3-1-7-s.js
+ * @description Strict Mode - checking 'this' (FunctionDeclaration defined within strict mode)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+"use strict";
+function f() {
+ return typeof this;
+}
+return f() === "undefined";
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70-s.js new file mode 100644 index 000000000..d1bf918ee --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-70-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.apply(globalObject))
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() { "use strict"; return this;};
+return f.apply(fnGlobalObject()) === fnGlobalObject();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70gs.js new file mode 100644 index 000000000..0044b8afd --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-70gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-70gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.apply(globalObject))
+ * @onlyStrict
+ */
+
+function f() { "use strict"; return this;};
+if (f.apply(fnGlobalObject()) !== fnGlobalObject()){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71-s.js new file mode 100644 index 000000000..5fe5dcba3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-71-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call())
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() { "use strict"; return this===undefined;};
+return f.call();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71gs.js new file mode 100644 index 000000000..c978be9ad --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-71gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-71gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call())
+ * @onlyStrict
+ */
+
+function f() { "use strict"; return this===undefined;};
+if (! f.call()){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72-s.js new file mode 100644 index 000000000..b9c669291 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-72-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call(null))
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() { "use strict"; return this===null;};
+return f.call(null);
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72gs.js new file mode 100644 index 000000000..49ca243d1 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-72gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-72gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call(null))
+ * @onlyStrict
+ */
+
+function f() { "use strict"; return this===null;};
+if (! f.call(null)){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73-s.js new file mode 100644 index 000000000..e04b5d7be --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-73-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call(undefined))
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() { "use strict"; return this===undefined;};
+return f.call(undefined);
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73gs.js new file mode 100644 index 000000000..10a3176db --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-73gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-73gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call(undefined))
+ * @onlyStrict
+ */
+
+function f() { "use strict"; return this===undefined;};
+if (! f.call(undefined)){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74-s.js new file mode 100644 index 000000000..7e2d746e3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74-s.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.3/10.4.3-1-74-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call(someObject))
+ * @onlyStrict
+ */
+
+function testcase() {
+var o = {};
+function f() { "use strict"; return this===o;};
+return f.call(o);
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74gs.js new file mode 100644 index 000000000..27a73d67f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-74gs.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-74gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call(someObject))
+ * @onlyStrict
+ */
+
+var o = {};
+function f() { "use strict"; return this===o;};
+if (! f.call(o)){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75-s.js new file mode 100644 index 000000000..fa8f4d4b0 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-75-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.call(globalObject))
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() { "use strict"; return this;};
+return f.call(fnGlobalObject()) === fnGlobalObject();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75gs.js new file mode 100644 index 000000000..3df699177 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-75gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-75gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.call(globalObject))
+ * @onlyStrict
+ */
+
+function f() { "use strict"; return this;};
+if (f.call(fnGlobalObject()) !== fnGlobalObject()){
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76-s.js new file mode 100644 index 000000000..7918f0dfa --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-76-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind()())
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() { "use strict"; return this===undefined;};
+return f.bind()();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76gs.js new file mode 100644 index 000000000..f61d0e324 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-76gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-76gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind()())
+ * @onlyStrict
+ */
+
+function f() { "use strict"; return this===undefined;};
+if (! (f.bind()())){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77-s.js new file mode 100644 index 000000000..fb5614dd9 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-77-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(null)())
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() { "use strict"; return this===null;};
+return f.bind(null)();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77gs.js new file mode 100644 index 000000000..51d38c398 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-77gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-77gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind(null)())
+ * @onlyStrict
+ */
+
+function f() { "use strict"; return this===null;};
+if (! (f.bind(null)())){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78-s.js new file mode 100644 index 000000000..3d50f279c --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-78-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(undefined)())
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() { "use strict"; return this===undefined;};
+return f.bind(undefined)();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78gs.js new file mode 100644 index 000000000..8d67642fa --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-78gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-78gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind(undefined)())
+ * @onlyStrict
+ */
+
+function f() { "use strict"; return this===undefined;};
+if (! (f.bind(undefined)())){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79-s.js new file mode 100644 index 000000000..5dace0a45 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79-s.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.3/10.4.3-1-79-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(someObject)())
+ * @onlyStrict
+ */
+
+function testcase() {
+var o = {};
+function f() { "use strict"; return this===o;};
+return f.bind(o)();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79gs.js new file mode 100644 index 000000000..a347c004a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-79gs.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-79gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind(someObject)())
+ * @onlyStrict
+ */
+
+var o = {};
+function f() { "use strict"; return this===o;};
+if (! (f.bind(o)())){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7gs.js new file mode 100644 index 000000000..23b1c0583 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-7gs.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.3/10.4.3-1-7gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionDeclaration defined within strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+function f() {
+ return typeof this;
+}
+if (f() !== "undefined") {
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8-s.js new file mode 100644 index 000000000..7d6beaa1a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8-s.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.3/10.4.3-1-8-s.js
+ * @description Strict Mode - checking 'this' (FunctionDeclaration includes strict directive prologue)
+ * @onlyStrict
+ */
+
+
+function testcase() {
+function f() {
+ "use strict";
+ return typeof this;
+}
+return f() === "undefined";
+}
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80-s.js new file mode 100644 index 000000000..86951b61a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-80-s.js
+ * @description Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(globalObject)())
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() { "use strict"; return this;};
+return f.bind(fnGlobalObject())() === fnGlobalObject();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80gs.js new file mode 100644 index 000000000..e3ed02e6a --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-80gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-80gs.js
+ * @description Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind(globalObject)())
+ * @onlyStrict
+ */
+
+function f() { "use strict"; return this;};
+if (f.bind(fnGlobalObject())() !== fnGlobalObject()){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81-s.js new file mode 100644 index 000000000..61be6b784 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81-s.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.3/10.4.3-1-81-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict function declaration)
+ * @noStrict
+ */
+
+function testcase() {
+function f() { return this!==undefined;};
+function foo() { "use strict"; return f();}
+return foo();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81gs.js new file mode 100644 index 000000000..0544e0cd7 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-81gs.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-81gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict function declaration)
+ * @noStrict
+ */
+
+function f() { return this!==undefined;};
+function foo() { "use strict"; return f();}
+if (! foo()){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82-s.js new file mode 100644 index 000000000..0a2b16600 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-82-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict eval)
+ * @noStrict
+ */
+
+function testcase() {
+function f() { return this!==undefined;};
+return (function () {"use strict"; return eval("f();");})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82gs.js new file mode 100644 index 000000000..305435eeb --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-82gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-82gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict eval)
+ * @noStrict
+ */
+
+function f() { return this!==undefined;};
+if (! ((function () {"use strict"; return eval("f();");})()) ){
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83-s.js new file mode 100644 index 000000000..f03adeff5 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-83-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function constructor)
+ * @noStrict
+ */
+
+function testcase() {
+fnGlobalObject().f = function() {return this!==undefined;};
+return (function () {return Function("\"use strict\";return f();")();})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83gs.js new file mode 100644 index 000000000..dfe59d84e --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-83gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-83gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function constructor)
+ * @noStrict
+ */
+
+function f() {return this!==undefined;};
+if (! ((function () {return Function("\"use strict\";return f();")();})()) ){
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84-s.js new file mode 100644 index 000000000..807817846 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-84-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict new'ed Function constructor)
+ * @noStrict
+ */
+
+function testcase() {
+fnGlobalObject().f = function() { return this!==undefined;};
+return (function () {return new Function("\"use strict\";return f();")();})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84gs.js new file mode 100644 index 000000000..23a20910d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-84gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-84gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict new'ed Function constructor)
+ * @noStrict
+ */
+
+function f() { return this!==undefined;};
+if (! ((function () {return new Function("\"use strict\";return f();")();})()) ){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85-s.js new file mode 100644 index 000000000..abdb33b92 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-85-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply())
+ * @noStrict
+ */
+
+function testcase() {
+function f() { return this!==undefined;};
+return (function () {"use strict"; return f.apply();})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85gs.js new file mode 100644 index 000000000..093115f32 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-85gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-85gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply())
+ * @noStrict
+ */
+
+function f() { return this!==undefined;};
+if (! ((function () {"use strict"; return f.apply();})())){
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86-s.js new file mode 100644 index 000000000..fca8007f3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-86-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(null))
+ * @noStrict
+ */
+
+function testcase() {
+function f() { return this===fnGlobalObject();};
+return (function () {"use strict"; return f.apply(null);})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86gs.js new file mode 100644 index 000000000..f1e23cce2 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-86gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-86gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(null))
+ * @noStrict
+ */
+
+function f() { return this===fnGlobalObject();};
+if (! ((function () {"use strict"; return f.apply(null);})())){
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87-s.js new file mode 100644 index 000000000..be4505ace --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-87-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(undefined))
+ * @noStrict
+ */
+
+function testcase() {
+function f() { return this===fnGlobalObject()};
+return (function () {"use strict"; return f.apply(undefined);})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87gs.js new file mode 100644 index 000000000..af76c9a8b --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-87gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-87gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(undefined))
+ * @noStrict
+ */
+
+function f() { return this===fnGlobalObject();};
+if (! ((function () {"use strict"; return f.apply(undefined);})())){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88-s.js new file mode 100644 index 000000000..72c424567 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88-s.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.3/10.4.3-1-88-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(someObject))
+ * @onlyStrict
+ */
+
+function testcase() {
+var o = {};
+function f() { return this===o;};
+return (function () {"use strict"; return f.apply(o);})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88gs.js new file mode 100644 index 000000000..8b85f6993 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-88gs.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-88gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(someObject))
+ * @onlyStrict
+ */
+
+var o = {};
+function f() { return this===o;};
+if (! ((function () {"use strict"; return f.apply(o);})())){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89-s.js new file mode 100644 index 000000000..451851d5b --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-89-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(globalObject))
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() { return this;};
+return (function () {"use strict"; return f.apply(fnGlobalObject()); })() === fnGlobalObject();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89gs.js new file mode 100644 index 000000000..68f415a64 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-89gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-89gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(globalObject))
+ * @onlyStrict
+ */
+
+function f() { return this;};
+if ((function () {"use strict"; return f.apply(fnGlobalObject());})() !== fnGlobalObject()){
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8gs.js new file mode 100644 index 000000000..814fb7ec7 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-8gs.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.3/10.4.3-1-8gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionDeclaration includes strict directive prologue)
+ * @onlyStrict
+ */
+
+function f() {
+ "use strict";
+ return typeof this;
+}
+if (f() !== "undefined") {
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9-s.js new file mode 100644 index 000000000..38ca374e7 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9-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.3/10.4.3-1-9-s.js
+ * @description Strict Mode - checking 'this' (FunctionExpression defined within strict mode)
+ * @onlyStrict
+ */
+
+function testcase() {
+"use strict";
+var f = function () {
+ return typeof this;
+}
+return f() === "undefined";
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90-s.js new file mode 100644 index 000000000..0b6a4b3f1 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-90-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call())
+ * @noStrict
+ */
+
+function testcase() {
+function f() { return this===fnGlobalObject();};
+return (function () {"use strict"; return f.call(); })();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90gs.js new file mode 100644 index 000000000..78a91247f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-90gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-90gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call())
+ * @noStrict
+ */
+
+function f() { return this===fnGlobalObject();};
+if (! ((function () {"use strict"; return f.call();})())){
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91-s.js new file mode 100644 index 000000000..2dc4007e9 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-91-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(null))
+ * @noStrict
+ */
+
+function testcase() {
+function f() { return this===fnGlobalObject();};
+return (function () {"use strict"; return f.call(null); })();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91gs.js new file mode 100644 index 000000000..c1052a773 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-91gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-91gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(null))
+ * @noStrict
+ */
+
+function f() { return this===fnGlobalObject();};
+if (! ((function () {"use strict"; return f.call(null); })())){
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92-s.js new file mode 100644 index 000000000..3a04a7b6f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-92-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(undefined))
+ * @noStrict
+ */
+
+function testcase() {
+function f() { return this===fnGlobalObject();};
+return (function () {"use strict"; return f.call(undefined);})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92gs.js new file mode 100644 index 000000000..4517302f3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-92gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-92gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(undefined))
+ * @noStrict
+ */
+
+function f() { return this===fnGlobalObject();};
+if (! ((function () {"use strict"; return f.call(undefined);})())){
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93-s.js new file mode 100644 index 000000000..e8da599e7 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93-s.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.3/10.4.3-1-93-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(someObject))
+ * @onlyStrict
+ */
+
+function testcase() {
+var o = {};
+function f() { return this===o;};
+return (function () {"use strict"; return f.call(o); })();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93gs.js new file mode 100644 index 000000000..44bd495b4 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-93gs.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-93gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(someObject))
+ * @onlyStrict
+ */
+
+var o = {};
+function f() { return this===o;};
+if (! ((function () {"use strict"; return f.call(o); })())){
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94-s.js new file mode 100644 index 000000000..655ac9e76 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-94-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(globalObject))
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() { return this===fnGlobalObject();};
+return (function () {"use strict"; return f.call(fnGlobalObject());})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94gs.js new file mode 100644 index 000000000..e752c688e --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-94gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-94gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(globalObject))
+ * @onlyStrict
+ */
+
+function f() { return this===fnGlobalObject();};
+if (! ((function () {"use strict"; return f.call(fnGlobalObject());})())){
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95-s.js new file mode 100644 index 000000000..db48e89d9 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-95-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind()())
+ * @noStrict
+ */
+
+function testcase() {
+function f() { return this===fnGlobalObject();};
+return (function () {"use strict"; return f.bind()(); })();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95gs.js new file mode 100644 index 000000000..5d5fc09b8 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-95gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-95gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind()())
+ * @noStrict
+ */
+
+function f() { return this===fnGlobalObject();};
+if (! ((function () {"use strict"; return f.bind()(); })())){
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96-s.js new file mode 100644 index 000000000..3c4e652c3 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-96-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(null)())
+ * @noStrict
+ */
+
+function testcase() {
+function f() { return this===fnGlobalObject();};
+return (function () {"use strict"; return f.bind(null)(); })();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96gs.js new file mode 100644 index 000000000..cbfe417c4 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-96gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-96gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(null)())
+ * @noStrict
+ */
+
+function f() { return this===fnGlobalObject();};
+if (! ((function () {"use strict"; return f.bind(null)(); })())){
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97-s.js new file mode 100644 index 000000000..feac73bd6 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-97-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(undefined)())
+ * @noStrict
+ */
+
+function testcase() {
+function f() { return this===fnGlobalObject();};
+return (function () {"use strict"; return f.bind(undefined)();})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97gs.js new file mode 100644 index 000000000..1e79dd96e --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-97gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-97gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(undefined)())
+ * @noStrict
+ */
+
+function f() { return this===fnGlobalObject();};
+if (! ((function () {"use strict"; return f.bind(undefined)(); })())){
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98-s.js new file mode 100644 index 000000000..1c07cafc6 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98-s.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.3/10.4.3-1-98-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(someObject)())
+ * @onlyStrict
+ */
+
+function testcase() {
+var o = {};
+function f() { return this===o;};
+return (function () {"use strict"; return f.bind(o)();})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98gs.js new file mode 100644 index 000000000..c72e9dcc6 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-98gs.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-98gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(someObject)())
+ * @onlyStrict
+ */
+
+var o = {};
+function f() { return this===o;};
+if (! ((function () {"use strict"; return f.bind(o)();})())){
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99-s.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99-s.js new file mode 100644 index 000000000..47b1dac4d --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99-s.js @@ -0,0 +1,16 @@ +/// 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.3/10.4.3-1-99-s.js
+ * @description Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(globalObject)())
+ * @onlyStrict
+ */
+
+function testcase() {
+function f() { return this===fnGlobalObject();};
+return (function () {"use strict"; return f.bind(fnGlobalObject())();})();
+}
+runTestCase(testcase);
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99gs.js new file mode 100644 index 000000000..5e9730d9f --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-99gs.js @@ -0,0 +1,15 @@ +/// 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.3/10.4.3-1-99gs.js
+ * @description Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(globalObject)())
+ * @onlyStrict
+ */
+
+function f() { return this===fnGlobalObject();};
+if (! ((function () {"use strict"; return f.bind(fnGlobalObject())();})())){
+ throw "'this' had incorrect value!";
+}
diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9gs.js b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9gs.js new file mode 100644 index 000000000..56c150c89 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/10.4.3-1-9gs.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.3/10.4.3-1-9gs.js
+ * @description Strict - checking 'this' from a global scope (FunctionExpression defined within strict mode)
+ * @onlyStrict
+ */
+
+"use strict";
+var f = function () {
+ return typeof this;
+}
+if (f() !== "undefined") {
+ throw "'this' had incorrect value!";
+}
\ No newline at end of file diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/S10.4.3_A1.js b/js/src/tests/test262/ch10/10.4/10.4.3/S10.4.3_A1.js new file mode 100644 index 000000000..ea2432219 --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/S10.4.3_A1.js @@ -0,0 +1,16 @@ +// 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.3/S10.4.3_A1.js + * @description When calling a strict anonymous function as a + * function, "this" should be bound to undefined. + * @onlyStrict + */ + +"use strict"; +var that = (function() { return this; })(); +if (that !== undefined) { + $ERROR('#1: "this" leaked as: ' + that); +} + diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/browser.js b/js/src/tests/test262/ch10/10.4/10.4.3/browser.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/browser.js diff --git a/js/src/tests/test262/ch10/10.4/10.4.3/shell.js b/js/src/tests/test262/ch10/10.4/10.4.3/shell.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/ch10/10.4/10.4.3/shell.js |