diff options
Diffstat (limited to 'test/language')
95 files changed, 203 insertions, 244 deletions
diff --git a/test/language/expressions/assignment/11.13.1-4-1.js b/test/language/expressions/assignment/11.13.1-4-1.js index a038fe33e..679ef8728 100644 --- a/test/language/expressions/assignment/11.13.1-4-1.js +++ b/test/language/expressions/assignment/11.13.1-4-1.js @@ -8,7 +8,6 @@ description: > simple assignment creates property on the global object if LeftHandSide is an unresolvable reference flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ function foo() { @@ -16,7 +15,7 @@ includes: [fnGlobalObject.js] } foo(); - var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), '__ES3_1_test_suite_test_11_13_1_unique_id_3__'); + var desc = Object.getOwnPropertyDescriptor(this, '__ES3_1_test_suite_test_11_13_1_unique_id_3__'); assert.sameValue(desc.value, 42, 'desc.value'); assert.sameValue(desc.writable, true, 'desc.writable'); diff --git a/test/language/expressions/assignment/11.13.1-4-27-s.js b/test/language/expressions/assignment/11.13.1-4-27-s.js index 42893ad88..eec767b91 100644 --- a/test/language/expressions/assignment/11.13.1-4-27-s.js +++ b/test/language/expressions/assignment/11.13.1-4-27-s.js @@ -7,9 +7,9 @@ description: > simple assignment throws TypeError if LeftHandSide is a readonly property in strict mode (Global.undefined) flags: [onlyStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; assert.throws(TypeError, function() { - fnGlobalObject().undefined = 42; + global.undefined = 42; }); diff --git a/test/language/expressions/assignment/11.13.1-4-3-s.js b/test/language/expressions/assignment/11.13.1-4-3-s.js index 20d175c7d..37c909ebd 100644 --- a/test/language/expressions/assignment/11.13.1-4-3-s.js +++ b/test/language/expressions/assignment/11.13.1-4-3-s.js @@ -7,10 +7,9 @@ description: > simple assignment throws TypeError if LeftHandSide is a readonly property in strict mode (Global.Infinity) flags: [onlyStrict] -includes: [fnGlobalObject.js] ---*/ - +var global = this; assert.throws(TypeError, function() { - fnGlobalObject().Infinity = 42; + global.Infinity = 42; }); diff --git a/test/language/expressions/assignment/S11.13.1_A5_T5.js b/test/language/expressions/assignment/S11.13.1_A5_T5.js index 6e9294167..cc11e5fdb 100755 --- a/test/language/expressions/assignment/S11.13.1_A5_T5.js +++ b/test/language/expressions/assignment/S11.13.1_A5_T5.js @@ -11,20 +11,19 @@ description: > created Reference even if the environment binding is no longer present. No ReferenceError is thrown when assignment is in strict-mode code and the original binding is no longer present. -includes: - - fnGlobalObject.js ---*/ -Object.defineProperty(fnGlobalObject(), "x", { +var global = this; +Object.defineProperty(this, "x", { configurable: true, value: 1 }); (function() { "use strict"; - x = (delete fnGlobalObject().x, 2); + x = (delete global.x, 2); })(); -if (fnGlobalObject().x !== 2) { - $ERROR('#1: fnGlobalObject().x === 2. Actual: ' + (fnGlobalObject().x)); +if (this.x !== 2) { + $ERROR('#1: this.x === 2. Actual: ' + (this.x)); } diff --git a/test/language/expressions/compound-assignment/S11.13.2_A5.10_T5.js b/test/language/expressions/compound-assignment/S11.13.2_A5.10_T5.js index 09e1e8268..4aef65ddf 100755 --- a/test/language/expressions/compound-assignment/S11.13.2_A5.10_T5.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A5.10_T5.js @@ -12,11 +12,9 @@ description: > No ReferenceError is thrown when 'x ^= y' is in strict-mode code and the original binding is no longer present. Check operator is "x ^= y". -includes: - - fnGlobalObject.js ---*/ -Object.defineProperty(fnGlobalObject(), "x", { +Object.defineProperty(this, "x", { configurable: true, get: function() { delete this.x; @@ -29,6 +27,6 @@ Object.defineProperty(fnGlobalObject(), "x", { x ^= 3; })(); -if (fnGlobalObject().x !== 1) { - $ERROR('#1: fnGlobalObject().x === 1. Actual: ' + (fnGlobalObject().x)); +if (this.x !== 1) { + $ERROR('#1: this.x === 1. Actual: ' + (this.x)); } diff --git a/test/language/expressions/compound-assignment/S11.13.2_A5.11_T5.js b/test/language/expressions/compound-assignment/S11.13.2_A5.11_T5.js index 50123ae5f..ecbed1071 100755 --- a/test/language/expressions/compound-assignment/S11.13.2_A5.11_T5.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A5.11_T5.js @@ -12,11 +12,9 @@ description: > No ReferenceError is thrown when 'x |= y' is in strict-mode code and the original binding is no longer present. Check operator is "x |= y". -includes: - - fnGlobalObject.js ---*/ -Object.defineProperty(fnGlobalObject(), "x", { +Object.defineProperty(this, "x", { configurable: true, get: function() { delete this.x; @@ -29,6 +27,6 @@ Object.defineProperty(fnGlobalObject(), "x", { x |= 4; })(); -if (fnGlobalObject().x !== 6) { - $ERROR('#1: fnGlobalObject().x === 6. Actual: ' + (fnGlobalObject().x)); +if (this.x !== 6) { + $ERROR('#1: this.x === 6. Actual: ' + (this.x)); } diff --git a/test/language/expressions/compound-assignment/S11.13.2_A5.1_T5.js b/test/language/expressions/compound-assignment/S11.13.2_A5.1_T5.js index e9d23ac6d..ebbf1f6d5 100755 --- a/test/language/expressions/compound-assignment/S11.13.2_A5.1_T5.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A5.1_T5.js @@ -12,11 +12,9 @@ description: > No ReferenceError is thrown when 'x *= y' is in strict-mode code and the original binding is no longer present. Check operator is "x *= y". -includes: - - fnGlobalObject.js ---*/ -Object.defineProperty(fnGlobalObject(), "x", { +Object.defineProperty(this, "x", { configurable: true, get: function() { delete this.x; @@ -29,6 +27,6 @@ Object.defineProperty(fnGlobalObject(), "x", { x *= 3; })(); -if (fnGlobalObject().x !== 6) { - $ERROR('#1: fnGlobalObject().x === 6. Actual: ' + (fnGlobalObject().x)); +if (this.x !== 6) { + $ERROR('#1: this.x === 6. Actual: ' + (this.x)); } diff --git a/test/language/expressions/compound-assignment/S11.13.2_A5.2_T5.js b/test/language/expressions/compound-assignment/S11.13.2_A5.2_T5.js index eeb64bcb3..e1753f707 100755 --- a/test/language/expressions/compound-assignment/S11.13.2_A5.2_T5.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A5.2_T5.js @@ -12,11 +12,9 @@ description: > No ReferenceError is thrown when 'x /= y' is in strict-mode code and the original binding is no longer present. Check operator is "x /= y". -includes: - - fnGlobalObject.js ---*/ -Object.defineProperty(fnGlobalObject(), "x", { +Object.defineProperty(this, "x", { configurable: true, get: function() { delete this.x; @@ -29,6 +27,6 @@ Object.defineProperty(fnGlobalObject(), "x", { x /= 3; })(); -if (fnGlobalObject().x !== 2) { - $ERROR('#1: fnGlobalObject().x === 2. Actual: ' + (fnGlobalObject().x)); +if (this.x !== 2) { + $ERROR('#1: this.x === 2. Actual: ' + (this.x)); } diff --git a/test/language/expressions/compound-assignment/S11.13.2_A5.3_T5.js b/test/language/expressions/compound-assignment/S11.13.2_A5.3_T5.js index 4dcd42f9a..70fa8fa78 100755 --- a/test/language/expressions/compound-assignment/S11.13.2_A5.3_T5.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A5.3_T5.js @@ -12,11 +12,9 @@ description: > No ReferenceError is thrown when 'x %= y' is in strict-mode code and the original binding is no longer present. Check operator is "x %= y". -includes: - - fnGlobalObject.js ---*/ -Object.defineProperty(fnGlobalObject(), "x", { +Object.defineProperty(this, "x", { configurable: true, get: function() { delete this.x; @@ -29,6 +27,6 @@ Object.defineProperty(fnGlobalObject(), "x", { x %= 3; })(); -if (fnGlobalObject().x !== 2) { - $ERROR('#1: fnGlobalObject().x === 2. Actual: ' + (fnGlobalObject().x)); +if (this.x !== 2) { + $ERROR('#1: this.x === 2. Actual: ' + (this.x)); } diff --git a/test/language/expressions/compound-assignment/S11.13.2_A5.4_T5.js b/test/language/expressions/compound-assignment/S11.13.2_A5.4_T5.js index 938501363..d49c695f4 100755 --- a/test/language/expressions/compound-assignment/S11.13.2_A5.4_T5.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A5.4_T5.js @@ -12,11 +12,9 @@ description: > No ReferenceError is thrown when 'x += y' is in strict-mode code and the original binding is no longer present. Check operator is "x += y". -includes: - - fnGlobalObject.js ---*/ -Object.defineProperty(fnGlobalObject(), "x", { +Object.defineProperty(this, "x", { configurable: true, get: function() { delete this.x; @@ -29,6 +27,6 @@ Object.defineProperty(fnGlobalObject(), "x", { x += 1; })(); -if (fnGlobalObject().x !== 3) { - $ERROR('#1: fnGlobalObject().x === 3. Actual: ' + (fnGlobalObject().x)); +if (this.x !== 3) { + $ERROR('#1: this.x === 3. Actual: ' + (this.x)); } diff --git a/test/language/expressions/compound-assignment/S11.13.2_A5.5_T5.js b/test/language/expressions/compound-assignment/S11.13.2_A5.5_T5.js index fd2ef123d..b2c7ad6e0 100755 --- a/test/language/expressions/compound-assignment/S11.13.2_A5.5_T5.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A5.5_T5.js @@ -12,11 +12,9 @@ description: > No ReferenceError is thrown when 'x -= y' is in strict-mode code and the original binding is no longer present. Check operator is "x -= y". -includes: - - fnGlobalObject.js ---*/ -Object.defineProperty(fnGlobalObject(), "x", { +Object.defineProperty(this, "x", { configurable: true, get: function() { delete this.x; @@ -29,6 +27,6 @@ Object.defineProperty(fnGlobalObject(), "x", { x -= 1; })(); -if (fnGlobalObject().x !== 1) { - $ERROR('#1: fnGlobalObject().x === 1. Actual: ' + (fnGlobalObject().x)); +if (this.x !== 1) { + $ERROR('#1: this.x === 1. Actual: ' + (this.x)); } diff --git a/test/language/expressions/compound-assignment/S11.13.2_A5.6_T5.js b/test/language/expressions/compound-assignment/S11.13.2_A5.6_T5.js index 16abab419..7eb81cd93 100755 --- a/test/language/expressions/compound-assignment/S11.13.2_A5.6_T5.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A5.6_T5.js @@ -12,11 +12,9 @@ description: > No ReferenceError is thrown when 'x <<= y' is in strict-mode code and the original binding is no longer present. Check operator is "x <<= y". -includes: - - fnGlobalObject.js ---*/ -Object.defineProperty(fnGlobalObject(), "x", { +Object.defineProperty(this, "x", { configurable: true, get: function() { delete this.x; @@ -29,6 +27,6 @@ Object.defineProperty(fnGlobalObject(), "x", { x <<= 3; })(); -if (fnGlobalObject().x !== 16) { - $ERROR('#1: fnGlobalObject().x === 16. Actual: ' + (fnGlobalObject().x)); +if (this.x !== 16) { + $ERROR('#1: this.x === 16. Actual: ' + (this.x)); } diff --git a/test/language/expressions/compound-assignment/S11.13.2_A5.7_T5.js b/test/language/expressions/compound-assignment/S11.13.2_A5.7_T5.js index 3a361b0f2..a818c5650 100755 --- a/test/language/expressions/compound-assignment/S11.13.2_A5.7_T5.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A5.7_T5.js @@ -12,11 +12,9 @@ description: > No ReferenceError is thrown when 'x >>= y' is in strict-mode code and the original binding is no longer present. Check operator is "x >>= y". -includes: - - fnGlobalObject.js ---*/ -Object.defineProperty(fnGlobalObject(), "x", { +Object.defineProperty(this, "x", { configurable: true, get: function() { delete this.x; @@ -29,6 +27,6 @@ Object.defineProperty(fnGlobalObject(), "x", { x >>= 3; })(); -if (fnGlobalObject().x !== 2) { - $ERROR('#1: fnGlobalObject().x === 2. Actual: ' + (fnGlobalObject().x)); +if (this.x !== 2) { + $ERROR('#1: this.x === 2. Actual: ' + (this.x)); } diff --git a/test/language/expressions/compound-assignment/S11.13.2_A5.8_T5.js b/test/language/expressions/compound-assignment/S11.13.2_A5.8_T5.js index bfc058a2c..f9dad8a82 100755 --- a/test/language/expressions/compound-assignment/S11.13.2_A5.8_T5.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A5.8_T5.js @@ -12,11 +12,9 @@ description: > No ReferenceError is thrown when 'x >>>= y' is in strict-mode code and the original binding is no longer present. Check operator is "x >>>= y". -includes: - - fnGlobalObject.js ---*/ -Object.defineProperty(fnGlobalObject(), "x", { +Object.defineProperty(this, "x", { configurable: true, get: function() { delete this.x; @@ -29,6 +27,6 @@ Object.defineProperty(fnGlobalObject(), "x", { x >>>= 3; })(); -if (fnGlobalObject().x !== 2) { - $ERROR('#1: fnGlobalObject().x === 2. Actual: ' + (fnGlobalObject().x)); +if (this.x !== 2) { + $ERROR('#1: this.x === 2. Actual: ' + (this.x)); } diff --git a/test/language/expressions/compound-assignment/S11.13.2_A5.9_T5.js b/test/language/expressions/compound-assignment/S11.13.2_A5.9_T5.js index 7fff695d4..20bfbea15 100755 --- a/test/language/expressions/compound-assignment/S11.13.2_A5.9_T5.js +++ b/test/language/expressions/compound-assignment/S11.13.2_A5.9_T5.js @@ -12,11 +12,9 @@ description: > No ReferenceError is thrown when 'x &= y' is in strict-mode code and the original binding is no longer present. Check operator is "x &= y". -includes: - - fnGlobalObject.js ---*/ -Object.defineProperty(fnGlobalObject(), "x", { +Object.defineProperty(this, "x", { configurable: true, get: function() { delete this.x; @@ -29,6 +27,6 @@ Object.defineProperty(fnGlobalObject(), "x", { x &= 3; })(); -if (fnGlobalObject().x !== 1) { - $ERROR('#1: fnGlobalObject().x === 1. Actual: ' + (fnGlobalObject().x)); +if (this.x !== 1) { + $ERROR('#1: this.x === 1. Actual: ' + (this.x)); } diff --git a/test/language/expressions/delete/11.4.1-4.a-8-s.js b/test/language/expressions/delete/11.4.1-4.a-8-s.js index a0dd257ef..3d4bdcd0f 100644 --- a/test/language/expressions/delete/11.4.1-4.a-8-s.js +++ b/test/language/expressions/delete/11.4.1-4.a-8-s.js @@ -10,10 +10,10 @@ description: > delete operator throws TypeError when deleting a non-configurable data property in strict mode flags: [onlyStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; // NaN (15.1.1.1) has [[Configurable]] set to false. assert.throws(TypeError, function() { - delete fnGlobalObject().NaN; + delete global.NaN; }); diff --git a/test/language/expressions/postfix-decrement/S11.3.2_A5_T5.js b/test/language/expressions/postfix-decrement/S11.3.2_A5_T5.js index fa8eccfb8..15576f9eb 100755 --- a/test/language/expressions/postfix-decrement/S11.3.2_A5_T5.js +++ b/test/language/expressions/postfix-decrement/S11.3.2_A5_T5.js @@ -11,11 +11,9 @@ description: > created Reference even if the environment binding is no longer present. No ReferenceError is thrown when 'x--' is in strict-mode code and the original binding is no longer present. -includes: - - fnGlobalObject.js ---*/ -Object.defineProperty(fnGlobalObject(), "x", { +Object.defineProperty(this, "x", { configurable: true, get: function() { delete this.x; @@ -28,6 +26,6 @@ Object.defineProperty(fnGlobalObject(), "x", { x--; })(); -if (fnGlobalObject().x !== 1) { - $ERROR('#1: fnGlobalObject().x === 1. Actual: ' + (fnGlobalObject().x)); +if (this.x !== 1) { + $ERROR('#1: this.x === 1. Actual: ' + (this.x)); } diff --git a/test/language/expressions/postfix-increment/S11.3.1_A5_T5.js b/test/language/expressions/postfix-increment/S11.3.1_A5_T5.js index 12248a0e0..9416dc516 100755 --- a/test/language/expressions/postfix-increment/S11.3.1_A5_T5.js +++ b/test/language/expressions/postfix-increment/S11.3.1_A5_T5.js @@ -11,11 +11,9 @@ description: > created Reference even if the environment binding is no longer present. No ReferenceError is thrown when 'x++' is in strict-mode code and the original binding is no longer present. -includes: - - fnGlobalObject.js ---*/ -Object.defineProperty(fnGlobalObject(), "x", { +Object.defineProperty(this, "x", { configurable: true, get: function() { delete this.x; @@ -28,6 +26,6 @@ Object.defineProperty(fnGlobalObject(), "x", { x++; })(); -if (fnGlobalObject().x !== 3) { - $ERROR('#1: fnGlobalObject().x === 3. Actual: ' + (fnGlobalObject().x)); +if (this.x !== 3) { + $ERROR('#1: this.x === 3. Actual: ' + (this.x)); } diff --git a/test/language/expressions/prefix-decrement/S11.4.5_A5_T5.js b/test/language/expressions/prefix-decrement/S11.4.5_A5_T5.js index d7df814cc..b59dc68c9 100755 --- a/test/language/expressions/prefix-decrement/S11.4.5_A5_T5.js +++ b/test/language/expressions/prefix-decrement/S11.4.5_A5_T5.js @@ -11,11 +11,9 @@ description: > created Reference even if the environment binding is no longer present. No ReferenceError is thrown when '--x' is in strict-mode code and the original binding is no longer present. -includes: - - fnGlobalObject.js ---*/ -Object.defineProperty(fnGlobalObject(), "x", { +Object.defineProperty(this, "x", { configurable: true, get: function() { delete this.x; @@ -28,6 +26,6 @@ Object.defineProperty(fnGlobalObject(), "x", { --x; })(); -if (fnGlobalObject().x !== 1) { - $ERROR('#1: fnGlobalObject().x === 1. Actual: ' + (fnGlobalObject().x)); +if (this.x !== 1) { + $ERROR('#1: this.x === 1. Actual: ' + (this.x)); } diff --git a/test/language/expressions/prefix-increment/S11.4.4_A5_T5.js b/test/language/expressions/prefix-increment/S11.4.4_A5_T5.js index 95953b1e0..5381e2a73 100755 --- a/test/language/expressions/prefix-increment/S11.4.4_A5_T5.js +++ b/test/language/expressions/prefix-increment/S11.4.4_A5_T5.js @@ -11,11 +11,9 @@ description: > created Reference even if the environment binding is no longer present. No ReferenceError is thrown when '++x' is in strict-mode code and the original binding is no longer present. -includes: - - fnGlobalObject.js ---*/ -Object.defineProperty(fnGlobalObject(), "x", { +Object.defineProperty(this, "x", { configurable: true, get: function() { delete this.x; @@ -28,6 +26,6 @@ Object.defineProperty(fnGlobalObject(), "x", { ++x; })(); -if (fnGlobalObject().x !== 3) { - $ERROR('#1: fnGlobalObject().x === 3. Actual: ' + (fnGlobalObject().x)); +if (this.x !== 3) { + $ERROR('#1: this.x === 3. Actual: ' + (this.x)); } diff --git a/test/language/function-code/10.4.3-1-101-s.js b/test/language/function-code/10.4.3-1-101-s.js index 442a00d35..ad1662426 100644 --- a/test/language/function-code/10.4.3-1-101-s.js +++ b/test/language/function-code/10.4.3-1-101-s.js @@ -7,7 +7,6 @@ description: > Strict Mode - checking 'this' (non-strict function passed as arg to String.prototype.replace from strict context) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ var x = 3; @@ -18,4 +17,4 @@ function f() { } assert.sameValue(function() {"use strict"; return "ab".replace("b", f);}(), "aa"); -assert.sameValue(x, fnGlobalObject(), 'x'); +assert.sameValue(x, this, 'x'); diff --git a/test/language/function-code/10.4.3-1-101gs.js b/test/language/function-code/10.4.3-1-101gs.js index d223b0bbd..3a432aa88 100644 --- a/test/language/function-code/10.4.3-1-101gs.js +++ b/test/language/function-code/10.4.3-1-101gs.js @@ -7,7 +7,6 @@ description: > Strict Mode - checking 'this' (non-strict function passed as arg to String.prototype.replace from strict context) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ var x = 3; @@ -17,6 +16,6 @@ function f() { return "a"; } -if ( (!(function() {"use strict"; return "ab".replace("b", f)==="aa";}())) || (x!==fnGlobalObject())) { +if ( (!(function() {"use strict"; return "ab".replace("b", f)==="aa";}())) || (x!==this)) { throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-17-s.js b/test/language/function-code/10.4.3-1-17-s.js index 055382c12..3a6e08bc1 100644 --- a/test/language/function-code/10.4.3-1-17-s.js +++ b/test/language/function-code/10.4.3-1-17-s.js @@ -5,11 +5,12 @@ es5id: 10.4.3-1-17-s description: Strict Mode - checking 'this' (eval used within strict mode) flags: [onlyStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + function testcase() { assert.sameValue(eval("typeof this"), "undefined", 'eval("typeof this")'); - assert.notSameValue(eval("this"), fnGlobalObject(), 'eval("this")'); + assert.notSameValue(eval("this"), global, 'eval("this")'); } testcase(); diff --git a/test/language/function-code/10.4.3-1-17gs.js b/test/language/function-code/10.4.3-1-17gs.js index ecd456638..4acd13273 100644 --- a/test/language/function-code/10.4.3-1-17gs.js +++ b/test/language/function-code/10.4.3-1-17gs.js @@ -7,9 +7,8 @@ description: > Strict - checking 'this' from a global scope (eval used within strict mode) flags: [onlyStrict] -includes: [fnGlobalObject.js] ---*/ -if (eval("this") !== fnGlobalObject()) { +if (eval("this") !== this) { throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-18gs.js b/test/language/function-code/10.4.3-1-18gs.js index 9fb3ba8f4..ebe09659b 100644 --- a/test/language/function-code/10.4.3-1-18gs.js +++ b/test/language/function-code/10.4.3-1-18gs.js @@ -7,9 +7,8 @@ description: > Strict - checking 'this' from a global scope (eval includes strict directive prologue) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -if (eval("\"use strict\";\nthis") !== fnGlobalObject()) { +if (eval("\"use strict\";\nthis") !== this) { throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-19-s.js b/test/language/function-code/10.4.3-1-19-s.js index 5aff016b9..f1c5beb30 100644 --- a/test/language/function-code/10.4.3-1-19-s.js +++ b/test/language/function-code/10.4.3-1-19-s.js @@ -7,11 +7,12 @@ description: > Strict Mode - checking 'this' (indirect eval used within strict mode) flags: [onlyStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + function testcase() { var my_eval = eval; -assert.sameValue(my_eval("this"), fnGlobalObject(), 'my_eval("this")'); +assert.sameValue(my_eval("this"), global, 'my_eval("this")'); } testcase(); diff --git a/test/language/function-code/10.4.3-1-19gs.js b/test/language/function-code/10.4.3-1-19gs.js index 3b4630a8e..db10f5486 100644 --- a/test/language/function-code/10.4.3-1-19gs.js +++ b/test/language/function-code/10.4.3-1-19gs.js @@ -7,10 +7,9 @@ description: > Strict - checking 'this' from a global scope (indirect eval used within strict mode) flags: [onlyStrict] -includes: [fnGlobalObject.js] ---*/ var my_eval = eval; -if (my_eval("this") !== fnGlobalObject()) { +if (my_eval("this") !== this) { throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-20-s.js b/test/language/function-code/10.4.3-1-20-s.js index 24c27b301..4da7e5aae 100644 --- a/test/language/function-code/10.4.3-1-20-s.js +++ b/test/language/function-code/10.4.3-1-20-s.js @@ -7,11 +7,12 @@ description: > Strict Mode - checking 'this' (indirect eval includes strict directive prologue) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + function testcase() { var my_eval = eval; -assert.sameValue(my_eval("\"use strict\";\nthis"), fnGlobalObject()); +assert.sameValue(my_eval("\"use strict\";\nthis"), this); } testcase(); diff --git a/test/language/function-code/10.4.3-1-20gs.js b/test/language/function-code/10.4.3-1-20gs.js index 5a1339a36..9a85f5263 100644 --- a/test/language/function-code/10.4.3-1-20gs.js +++ b/test/language/function-code/10.4.3-1-20gs.js @@ -7,10 +7,9 @@ description: > Strict - checking 'this' from a global scope (indirect eval includes strict directive prologue) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ var my_eval = eval; -if (my_eval("\"use strict\";\nthis") !== fnGlobalObject() ) { +if (my_eval("\"use strict\";\nthis") !== this ) { throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-21-s.js b/test/language/function-code/10.4.3-1-21-s.js index 5182c995d..a491dc3dd 100644 --- a/test/language/function-code/10.4.3-1-21-s.js +++ b/test/language/function-code/10.4.3-1-21-s.js @@ -7,12 +7,11 @@ description: > Strict Mode - checking 'this' (New'ed object from FunctionDeclaration defined within strict mode) flags: [onlyStrict] -includes: [fnGlobalObject.js] ---*/ function f() { return this; } -assert.notSameValue((new f()), fnGlobalObject(), '(new f())'); +assert.notSameValue((new f()), this, '(new f())'); assert.notSameValue(typeof (new f()), "undefined", 'typeof (new f())'); diff --git a/test/language/function-code/10.4.3-1-21gs.js b/test/language/function-code/10.4.3-1-21gs.js index 31e41a011..85c23bc71 100644 --- a/test/language/function-code/10.4.3-1-21gs.js +++ b/test/language/function-code/10.4.3-1-21gs.js @@ -7,12 +7,11 @@ description: > Strict - checking 'this' from a global scope (New'ed object from FunctionDeclaration defined within strict mode) flags: [onlyStrict] -includes: [fnGlobalObject.js] ---*/ function f() { return this; } -if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { +if (((new f()) === this) || (typeof (new f()) === "undefined")) { throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-22-s.js b/test/language/function-code/10.4.3-1-22-s.js index 2e836e2ec..335db96ea 100644 --- a/test/language/function-code/10.4.3-1-22-s.js +++ b/test/language/function-code/10.4.3-1-22-s.js @@ -7,7 +7,6 @@ description: > Strict Mode - checking 'this' (New'ed object from FunctionDeclaration includes strict directive prologue) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ function f() { @@ -15,5 +14,5 @@ function f() { return this; } -assert.notSameValue((new f()), fnGlobalObject(), '(new f())'); +assert.notSameValue((new f()), this, '(new f())'); assert.notSameValue(typeof (new f()), "undefined", 'typeof (new f())'); diff --git a/test/language/function-code/10.4.3-1-22gs.js b/test/language/function-code/10.4.3-1-22gs.js index 55cdaa4fd..82e4c5d09 100644 --- a/test/language/function-code/10.4.3-1-22gs.js +++ b/test/language/function-code/10.4.3-1-22gs.js @@ -7,13 +7,12 @@ description: > Strict - checking 'this' from a global scope (New'ed object from FunctionDeclaration includes strict directive prologue) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ function f() { "use strict"; return this; } -if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { +if (((new f()) === this) || (typeof (new f()) === "undefined")) { throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-23-s.js b/test/language/function-code/10.4.3-1-23-s.js index 68ca1f159..d91e403c4 100644 --- a/test/language/function-code/10.4.3-1-23-s.js +++ b/test/language/function-code/10.4.3-1-23-s.js @@ -7,12 +7,11 @@ description: > Strict Mode - checking 'this' (New'ed object from FunctionExpression defined within strict mode) flags: [onlyStrict] -includes: [fnGlobalObject.js] ---*/ var f = function () { return this; } -assert.notSameValue((new f()), fnGlobalObject(), '(new f())'); +assert.notSameValue((new f()), this, '(new f())'); assert.notSameValue(typeof (new f()), "undefined", 'typeof (new f())'); diff --git a/test/language/function-code/10.4.3-1-23gs.js b/test/language/function-code/10.4.3-1-23gs.js index 17f385269..b66a27c35 100644 --- a/test/language/function-code/10.4.3-1-23gs.js +++ b/test/language/function-code/10.4.3-1-23gs.js @@ -7,12 +7,11 @@ description: > Strict - checking 'this' from a global scope (New'ed object from FunctionExpression defined within strict mode) flags: [onlyStrict] -includes: [fnGlobalObject.js] ---*/ var f = function () { return this; } -if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { +if (((new f()) === this) || (typeof (new f()) === "undefined")) { throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-24-s.js b/test/language/function-code/10.4.3-1-24-s.js index 1f42d08f8..7ed433759 100644 --- a/test/language/function-code/10.4.3-1-24-s.js +++ b/test/language/function-code/10.4.3-1-24-s.js @@ -7,7 +7,6 @@ description: > Strict Mode - checking 'this' (New'ed object from FunctionExpression includes strict directive prologue) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ var f = function () { @@ -15,5 +14,5 @@ var f = function () { return this; } -assert.notSameValue((new f()), fnGlobalObject(), '(new f())'); +assert.notSameValue((new f()), this, '(new f())'); assert.notSameValue(typeof (new f()), "undefined", 'typeof (new f())'); diff --git a/test/language/function-code/10.4.3-1-24gs.js b/test/language/function-code/10.4.3-1-24gs.js index fc156a0c0..97b8d7ad5 100644 --- a/test/language/function-code/10.4.3-1-24gs.js +++ b/test/language/function-code/10.4.3-1-24gs.js @@ -7,13 +7,12 @@ description: > Strict - checking 'this' from a global scope (New'ed object from FunctionExpression includes strict directive prologue) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ var f = function () { "use strict"; return this; } -if (((new f()) === fnGlobalObject()) || (typeof (new f()) === "undefined")) { +if (((new f()) === this) || (typeof (new f()) === "undefined")) { throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-25-s.js b/test/language/function-code/10.4.3-1-25-s.js index 715933044..d63d56547 100644 --- a/test/language/function-code/10.4.3-1-25-s.js +++ b/test/language/function-code/10.4.3-1-25-s.js @@ -7,12 +7,11 @@ description: > Strict Mode - checking 'this' (New'ed object from Anonymous FunctionExpression defined within strict mode) flags: [onlyStrict] -includes: [fnGlobalObject.js] ---*/ var obj = new (function () { return this; }); -assert.notSameValue(obj, fnGlobalObject(), 'obj'); +assert.notSameValue(obj, this, 'obj'); assert.notSameValue((typeof obj), "undefined", '(typeof obj)'); diff --git a/test/language/function-code/10.4.3-1-25gs.js b/test/language/function-code/10.4.3-1-25gs.js index 049e6b694..17dfe0167 100644 --- a/test/language/function-code/10.4.3-1-25gs.js +++ b/test/language/function-code/10.4.3-1-25gs.js @@ -7,12 +7,11 @@ description: > Strict - checking 'this' from a global scope (New'ed object from Anonymous FunctionExpression defined within strict mode) flags: [onlyStrict] -includes: [fnGlobalObject.js] ---*/ var obj = new (function () { return this; }); -if ((obj === fnGlobalObject()) || (typeof obj === "undefined")) { +if ((obj === this) || (typeof obj === "undefined")) { throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-26-s.js b/test/language/function-code/10.4.3-1-26-s.js index fd7135282..494a12ee4 100644 --- a/test/language/function-code/10.4.3-1-26-s.js +++ b/test/language/function-code/10.4.3-1-26-s.js @@ -7,7 +7,6 @@ description: > Strict Mode - checking 'this' (New'ed object from Anonymous FunctionExpression includes strict directive prologue) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ var obj = new (function () { @@ -15,5 +14,5 @@ var obj = new (function () { return this; }); -assert.notSameValue(obj, fnGlobalObject(), 'obj'); +assert.notSameValue(obj, this, 'obj'); assert.notSameValue((typeof obj), "undefined", '(typeof obj)'); diff --git a/test/language/function-code/10.4.3-1-26gs.js b/test/language/function-code/10.4.3-1-26gs.js index 40b7f114c..4d02c8626 100644 --- a/test/language/function-code/10.4.3-1-26gs.js +++ b/test/language/function-code/10.4.3-1-26gs.js @@ -7,13 +7,12 @@ description: > Strict - checking 'this' from a global scope (New'ed object from Anonymous FunctionExpression includes strict directive prologue) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ var obj = new (function () { "use strict"; return this; }); -if ((obj === fnGlobalObject()) || (typeof obj === "undefined")) { +if ((obj === this) || (typeof obj === "undefined")) { throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-45-s.js b/test/language/function-code/10.4.3-1-45-s.js index 5d8577b93..49df44a15 100644 --- a/test/language/function-code/10.4.3-1-45-s.js +++ b/test/language/function-code/10.4.3-1-45-s.js @@ -7,15 +7,16 @@ description: > Strict Mode - checking 'this' (FunctionDeclaration with a strict directive prologue defined within a FunctionDeclaration) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + function f1() { function f() { "use strict"; return typeof this; } - return (f()==="undefined") && (this===fnGlobalObject()); + return (f()==="undefined") && (this===global); } assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-45gs.js b/test/language/function-code/10.4.3-1-45gs.js index 45e37da19..e182cb064 100644 --- a/test/language/function-code/10.4.3-1-45gs.js +++ b/test/language/function-code/10.4.3-1-45gs.js @@ -8,15 +8,16 @@ description: > with a strict directive prologue defined within a FunctionDeclaration) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + function f1() { function f() { "use strict"; return typeof this; } - return (f()==="undefined") && (this===fnGlobalObject()); + return (f()==="undefined") && (this===global); } if (! f1()) { throw "'this' had incorrect value!"; diff --git a/test/language/function-code/10.4.3-1-46-s.js b/test/language/function-code/10.4.3-1-46-s.js index a1b41beec..cc80c6ce1 100644 --- a/test/language/function-code/10.4.3-1-46-s.js +++ b/test/language/function-code/10.4.3-1-46-s.js @@ -7,15 +7,16 @@ description: > Strict Mode - checking 'this' (FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + function f1() { var f = function () { "use strict"; return typeof this; } - return (f()==="undefined") && (this===fnGlobalObject()); + return (f()==="undefined") && (this===global); } assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-46gs.js b/test/language/function-code/10.4.3-1-46gs.js index 53935f5fa..e7cfd0294 100644 --- a/test/language/function-code/10.4.3-1-46gs.js +++ b/test/language/function-code/10.4.3-1-46gs.js @@ -8,15 +8,16 @@ description: > with a strict directive prologue defined within a FunctionDeclaration) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + function f1() { var f = function () { "use strict"; return typeof this; } - return (f()==="undefined") && (this===fnGlobalObject()); + return (f()==="undefined") && (this===global); } if (! f1()) { throw "'this' had incorrect value!"; diff --git a/test/language/function-code/10.4.3-1-47-s.js b/test/language/function-code/10.4.3-1-47-s.js index 190a71b4b..2ce8bec97 100644 --- a/test/language/function-code/10.4.3-1-47-s.js +++ b/test/language/function-code/10.4.3-1-47-s.js @@ -7,14 +7,15 @@ description: > Strict Mode - checking 'this' (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + function f1() { return ((function () { "use strict"; return typeof this; - })()==="undefined") && (this===fnGlobalObject()); + })()==="undefined") && (this===global); } assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-47gs.js b/test/language/function-code/10.4.3-1-47gs.js index d84296c46..2ec05bb65 100644 --- a/test/language/function-code/10.4.3-1-47gs.js +++ b/test/language/function-code/10.4.3-1-47gs.js @@ -8,14 +8,15 @@ description: > FunctionExpression with a strict directive prologue defined within a FunctionDeclaration) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + function f1() { return ((function () { "use strict"; return typeof this; - })()==="undefined") && (this===fnGlobalObject()); + })()==="undefined") && (this===global); } if (! f1()) { throw "'this' had incorrect value!"; diff --git a/test/language/function-code/10.4.3-1-48-s.js b/test/language/function-code/10.4.3-1-48-s.js index d71463da1..3825f2e03 100644 --- a/test/language/function-code/10.4.3-1-48-s.js +++ b/test/language/function-code/10.4.3-1-48-s.js @@ -7,15 +7,16 @@ description: > Strict Mode - checking 'this' (FunctionDeclaration with a strict directive prologue defined within a FunctionExpression) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + var f1 = function () { function f() { "use strict"; return typeof this; } - return (f()==="undefined") && (this===fnGlobalObject()); + return (f()==="undefined") && (this===global); } assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-48gs.js b/test/language/function-code/10.4.3-1-48gs.js index 6840f11b7..d83214fa7 100644 --- a/test/language/function-code/10.4.3-1-48gs.js +++ b/test/language/function-code/10.4.3-1-48gs.js @@ -8,15 +8,16 @@ description: > with a strict directive prologue defined within a FunctionExpression) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + var f1 = function () { function f() { "use strict"; return typeof this; } - return (f()==="undefined") && (this===fnGlobalObject()); + return (f()==="undefined") && (this===global); } if (! f1()) { throw "'this' had incorrect value!"; diff --git a/test/language/function-code/10.4.3-1-49-s.js b/test/language/function-code/10.4.3-1-49-s.js index ecd6d827e..51e51e618 100644 --- a/test/language/function-code/10.4.3-1-49-s.js +++ b/test/language/function-code/10.4.3-1-49-s.js @@ -7,15 +7,16 @@ description: > Strict Mode - checking 'this' (FunctionExpression with a strict directive prologue defined within a FunctionExpression) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + var f1 = function () { var f = function () { "use strict"; return typeof this; } - return (f()==="undefined") && (this===fnGlobalObject()); + return (f()==="undefined") && (this===global); } assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-49gs.js b/test/language/function-code/10.4.3-1-49gs.js index 0f31d357b..12818c402 100644 --- a/test/language/function-code/10.4.3-1-49gs.js +++ b/test/language/function-code/10.4.3-1-49gs.js @@ -8,15 +8,16 @@ description: > with a strict directive prologue defined within a FunctionExpression) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + var f1 = function () { var f = function () { "use strict"; return typeof this; } - return (f()==="undefined") && (this===fnGlobalObject()); + return (f()==="undefined") && (this===global); } if (! f1()) { throw "'this' had incorrect value!"; diff --git a/test/language/function-code/10.4.3-1-50-s.js b/test/language/function-code/10.4.3-1-50-s.js index f7e864c20..90abe6ffc 100644 --- a/test/language/function-code/10.4.3-1-50-s.js +++ b/test/language/function-code/10.4.3-1-50-s.js @@ -7,14 +7,15 @@ description: > Strict Mode - checking 'this' (Anonymous FunctionExpression with a strict directive prologue defined within a FunctionExpression) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + var f1 = function () { return ((function () { "use strict"; return typeof this; - })()==="undefined") && (this===fnGlobalObject()); + })()==="undefined") && (this===global); } assert(f1(), 'f1() !== true'); diff --git a/test/language/function-code/10.4.3-1-50gs.js b/test/language/function-code/10.4.3-1-50gs.js index c1e667060..c583bae88 100644 --- a/test/language/function-code/10.4.3-1-50gs.js +++ b/test/language/function-code/10.4.3-1-50gs.js @@ -8,14 +8,15 @@ description: > FunctionExpression with a strict directive prologue defined within a FunctionExpression) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + var f1 = function () { return ((function () { "use strict"; return typeof this; - })()==="undefined") && (this===fnGlobalObject()); + })()==="undefined") && (this===global); } if (! f1()) { throw "'this' had incorrect value!"; diff --git a/test/language/function-code/10.4.3-1-51-s.js b/test/language/function-code/10.4.3-1-51-s.js index 399451d4e..f2c48d6ce 100644 --- a/test/language/function-code/10.4.3-1-51-s.js +++ b/test/language/function-code/10.4.3-1-51-s.js @@ -7,14 +7,15 @@ description: > Strict Mode - checking 'this' (FunctionDeclaration with a strict directive prologue defined within an Anonymous FunctionExpression) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + (function () { function f() { "use strict"; return typeof this; } assert.sameValue(f(), "undefined", 'f()'); - assert.sameValue(this, fnGlobalObject(), 'this'); + assert.sameValue(this, global, 'this'); })(); diff --git a/test/language/function-code/10.4.3-1-51gs.js b/test/language/function-code/10.4.3-1-51gs.js index 3c6f9810a..bbee7f144 100644 --- a/test/language/function-code/10.4.3-1-51gs.js +++ b/test/language/function-code/10.4.3-1-51gs.js @@ -8,15 +8,16 @@ description: > with a strict directive prologue defined within an Anonymous FunctionExpression) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + if (! ((function () { function f() { "use strict"; return typeof this; } - return (f()==="undefined") && (this===fnGlobalObject()); + return (f()==="undefined") && (this===global); })())) { throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-52-s.js b/test/language/function-code/10.4.3-1-52-s.js index 6ec647b5d..64028c22d 100644 --- a/test/language/function-code/10.4.3-1-52-s.js +++ b/test/language/function-code/10.4.3-1-52-s.js @@ -7,14 +7,15 @@ description: > Strict Mode - checking 'this' (FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + (function () { var f = function () { "use strict"; return typeof this; } assert.sameValue(f(), "undefined", 'f()'); - assert.sameValue(this, fnGlobalObject(), 'this'); + assert.sameValue(this, global, 'this'); })(); diff --git a/test/language/function-code/10.4.3-1-52gs.js b/test/language/function-code/10.4.3-1-52gs.js index f33607f6e..42ac10f69 100644 --- a/test/language/function-code/10.4.3-1-52gs.js +++ b/test/language/function-code/10.4.3-1-52gs.js @@ -8,15 +8,16 @@ description: > with a strict directive prologue defined within an Anonymous FunctionExpression) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + if (! ((function () { var f = function () { "use strict"; return typeof this; } - return (f()==="undefined") && (this===fnGlobalObject()); + return (f()==="undefined") && (this===global); })())) { throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-53-s.js b/test/language/function-code/10.4.3-1-53-s.js index 598bdbe55..d559f0be2 100644 --- a/test/language/function-code/10.4.3-1-53-s.js +++ b/test/language/function-code/10.4.3-1-53-s.js @@ -8,13 +8,14 @@ description: > strict directive prologue defined within an Anonymous FunctionExpression) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + (function () { assert.sameValue((function () { "use strict"; return typeof this; })(), "undefined"); - assert.sameValue(this, fnGlobalObject(), 'this'); + assert.sameValue(this, global, 'this'); })(); diff --git a/test/language/function-code/10.4.3-1-53gs.js b/test/language/function-code/10.4.3-1-53gs.js index ddd505866..92243a6cc 100644 --- a/test/language/function-code/10.4.3-1-53gs.js +++ b/test/language/function-code/10.4.3-1-53gs.js @@ -8,14 +8,15 @@ description: > FunctionExpression with a strict directive prologue defined within an Anonymous FunctionExpression) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; + if (! ((function () { return ((function () { "use strict"; return typeof this; - })()==="undefined") && (this===fnGlobalObject()); + })()==="undefined") && (this===global); })())) { throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-64-s.js b/test/language/function-code/10.4.3-1-64-s.js index 2c756125d..345f55067 100644 --- a/test/language/function-code/10.4.3-1-64-s.js +++ b/test/language/function-code/10.4.3-1-64-s.js @@ -6,8 +6,7 @@ es5id: 10.4.3-1-64-s description: > checking 'this' (strict function declaration called by non-strict Function constructor) -includes: [fnGlobalObject.js] ---*/ -fnGlobalObject().f = function() { "use strict"; return this===undefined;}; +this.f = function() { "use strict"; return this===undefined;}; assert(Function("return f();")()); diff --git a/test/language/function-code/10.4.3-1-65-s.js b/test/language/function-code/10.4.3-1-65-s.js index f3d118076..784022f55 100644 --- a/test/language/function-code/10.4.3-1-65-s.js +++ b/test/language/function-code/10.4.3-1-65-s.js @@ -6,8 +6,7 @@ es5id: 10.4.3-1-65-s description: > checking 'this' (strict function declaration called by non-strict new'ed Function constructor) -includes: [fnGlobalObject.js] ---*/ -fnGlobalObject().f = function() { "use strict"; return this===undefined;}; +this.f = function() { "use strict"; return this===undefined;}; assert((new Function("return f();"))()); diff --git a/test/language/function-code/10.4.3-1-70-s.js b/test/language/function-code/10.4.3-1-70-s.js index b989b66f1..aaff9c685 100644 --- a/test/language/function-code/10.4.3-1-70-s.js +++ b/test/language/function-code/10.4.3-1-70-s.js @@ -6,9 +6,8 @@ es5id: 10.4.3-1-70-s description: > checking 'this' (strict function declaration called by Function.prototype.apply(globalObject)) -includes: [fnGlobalObject.js] ---*/ function f() { "use strict"; return this;}; -assert.sameValue(f.apply(fnGlobalObject()), fnGlobalObject(), 'f.apply(fnGlobalObject())'); +assert.sameValue(f.apply(this), this, 'f.apply(this)'); diff --git a/test/language/function-code/10.4.3-1-70gs.js b/test/language/function-code/10.4.3-1-70gs.js index 3bf0900e4..698657049 100644 --- a/test/language/function-code/10.4.3-1-70gs.js +++ b/test/language/function-code/10.4.3-1-70gs.js @@ -6,10 +6,9 @@ es5id: 10.4.3-1-70gs description: > checking 'this' from a global scope (strict function declaration called by Function.prototype.apply(globalObject)) -includes: [fnGlobalObject.js] ---*/ function f() { "use strict"; return this;}; -if (f.apply(fnGlobalObject()) !== fnGlobalObject()){ +if (f.apply(this) !== this){ throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-75-s.js b/test/language/function-code/10.4.3-1-75-s.js index 255480d52..fedd20f1b 100644 --- a/test/language/function-code/10.4.3-1-75-s.js +++ b/test/language/function-code/10.4.3-1-75-s.js @@ -6,9 +6,8 @@ es5id: 10.4.3-1-75-s description: > checking 'this' (strict function declaration called by Function.prototype.call(globalObject)) -includes: [fnGlobalObject.js] ---*/ function f() { "use strict"; return this;}; -assert.sameValue(f.call(fnGlobalObject()), fnGlobalObject(), 'f.call(fnGlobalObject())'); +assert.sameValue(f.call(this), this, 'f.call(this)'); diff --git a/test/language/function-code/10.4.3-1-75gs.js b/test/language/function-code/10.4.3-1-75gs.js index b8938ffa7..e2262cb84 100644 --- a/test/language/function-code/10.4.3-1-75gs.js +++ b/test/language/function-code/10.4.3-1-75gs.js @@ -6,10 +6,9 @@ es5id: 10.4.3-1-75gs description: > checking 'this' from a global scope (strict function declaration called by Function.prototype.call(globalObject)) -includes: [fnGlobalObject.js] ---*/ function f() { "use strict"; return this;}; -if (f.call(fnGlobalObject()) !== fnGlobalObject()){ +if (f.call(this) !== this){ throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-80-s.js b/test/language/function-code/10.4.3-1-80-s.js index 9d1335707..d313b3865 100644 --- a/test/language/function-code/10.4.3-1-80-s.js +++ b/test/language/function-code/10.4.3-1-80-s.js @@ -7,9 +7,8 @@ description: > Strict Mode - checking 'this' (strict function declaration called by Function.prototype.bind(globalObject)()) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ function f() { "use strict"; return this;}; -assert.sameValue(f.bind(fnGlobalObject())(), fnGlobalObject(), 'f.bind(fnGlobalObject())()'); +assert.sameValue(f.bind(this)(), this, 'f.bind(this)()'); diff --git a/test/language/function-code/10.4.3-1-80gs.js b/test/language/function-code/10.4.3-1-80gs.js index 580a510c5..8433b880b 100644 --- a/test/language/function-code/10.4.3-1-80gs.js +++ b/test/language/function-code/10.4.3-1-80gs.js @@ -7,10 +7,9 @@ description: > Strict - checking 'this' from a global scope (strict function declaration called by Function.prototype.bind(globalObject)()) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ function f() { "use strict"; return this;}; -if (f.bind(fnGlobalObject())() !== fnGlobalObject()){ +if (f.bind(this)() !== this){ throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-83-s.js b/test/language/function-code/10.4.3-1-83-s.js index d7d4583ae..5365d9691 100644 --- a/test/language/function-code/10.4.3-1-83-s.js +++ b/test/language/function-code/10.4.3-1-83-s.js @@ -7,8 +7,7 @@ description: > Strict Mode - checking 'this' (non-strict function declaration called by strict Function constructor) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -fnGlobalObject().f = function() {return this!==undefined;}; +this.f = function() {return this!==undefined;}; assert((function () {return Function("\"use strict\";return f();")();})()); diff --git a/test/language/function-code/10.4.3-1-84-s.js b/test/language/function-code/10.4.3-1-84-s.js index 467a323e5..ff5a7f904 100644 --- a/test/language/function-code/10.4.3-1-84-s.js +++ b/test/language/function-code/10.4.3-1-84-s.js @@ -7,8 +7,7 @@ description: > Strict Mode - checking 'this' (non-strict function declaration called by strict new'ed Function constructor) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -fnGlobalObject().f = function() { return this!==undefined;}; +this.f = function() { return this!==undefined;}; assert((function () {return new Function("\"use strict\";return f();")();})()); diff --git a/test/language/function-code/10.4.3-1-86-s.js b/test/language/function-code/10.4.3-1-86-s.js index 824d5d36b..570923af0 100644 --- a/test/language/function-code/10.4.3-1-86-s.js +++ b/test/language/function-code/10.4.3-1-86-s.js @@ -7,8 +7,8 @@ description: > Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(null)) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; +var global = this; +function f() { return this===global;}; assert((function () {"use strict"; return f.apply(null);})()); diff --git a/test/language/function-code/10.4.3-1-86gs.js b/test/language/function-code/10.4.3-1-86gs.js index e909eec16..a3a3ecb65 100644 --- a/test/language/function-code/10.4.3-1-86gs.js +++ b/test/language/function-code/10.4.3-1-86gs.js @@ -7,10 +7,10 @@ description: > Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(null)) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; +var global = this; +function f() { return this===global;}; if (! ((function () {"use strict"; return f.apply(null);})())){ throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-87-s.js b/test/language/function-code/10.4.3-1-87-s.js index f4a1313fe..1c2f2f36f 100644 --- a/test/language/function-code/10.4.3-1-87-s.js +++ b/test/language/function-code/10.4.3-1-87-s.js @@ -7,8 +7,8 @@ description: > Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(undefined)) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject()}; +var global = this; +function f() { return this===global}; assert((function () {"use strict"; return f.apply(undefined);})()); diff --git a/test/language/function-code/10.4.3-1-87gs.js b/test/language/function-code/10.4.3-1-87gs.js index 87dd0be56..123b4b560 100644 --- a/test/language/function-code/10.4.3-1-87gs.js +++ b/test/language/function-code/10.4.3-1-87gs.js @@ -7,10 +7,10 @@ description: > Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.apply(undefined)) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; +var global = this; +function f() { return this===global;}; if (! ((function () {"use strict"; return f.apply(undefined);})())){ throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-89-s.js b/test/language/function-code/10.4.3-1-89-s.js index 799cb85f3..0243234b8 100644 --- a/test/language/function-code/10.4.3-1-89-s.js +++ b/test/language/function-code/10.4.3-1-89-s.js @@ -7,8 +7,8 @@ description: > Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.apply(globalObject)) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; function f() { return this;}; -assert.sameValue((function () {"use strict"; return f.apply(fnGlobalObject()); })(), fnGlobalObject()); +assert.sameValue((function () {"use strict"; return f.apply(global); })(), global); diff --git a/test/language/function-code/10.4.3-1-89gs.js b/test/language/function-code/10.4.3-1-89gs.js index eb72e26fa..89d939a74 100644 --- a/test/language/function-code/10.4.3-1-89gs.js +++ b/test/language/function-code/10.4.3-1-89gs.js @@ -8,10 +8,10 @@ description: > declaration called by strict Function.prototype.apply(globalObject)) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ +var global = this; function f() { return this;}; -if ((function () {"use strict"; return f.apply(fnGlobalObject());})() !== fnGlobalObject()){ +if ((function () {"use strict"; return f.apply(global);})() !== global){ throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-90-s.js b/test/language/function-code/10.4.3-1-90-s.js index 60005ca83..af9997751 100644 --- a/test/language/function-code/10.4.3-1-90-s.js +++ b/test/language/function-code/10.4.3-1-90-s.js @@ -7,8 +7,8 @@ description: > Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call()) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; +var global = this; +function f() { return this===global;}; assert((function () {"use strict"; return f.call(); })()); diff --git a/test/language/function-code/10.4.3-1-90gs.js b/test/language/function-code/10.4.3-1-90gs.js index 2abf2882e..6cbb0f609 100644 --- a/test/language/function-code/10.4.3-1-90gs.js +++ b/test/language/function-code/10.4.3-1-90gs.js @@ -7,10 +7,10 @@ description: > Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call()) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; +var global = this; +function f() { return this===global;}; if (! ((function () {"use strict"; return f.call();})())){ throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-91-s.js b/test/language/function-code/10.4.3-1-91-s.js index 3bb35a53c..c64008d65 100644 --- a/test/language/function-code/10.4.3-1-91-s.js +++ b/test/language/function-code/10.4.3-1-91-s.js @@ -7,8 +7,8 @@ description: > Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(null)) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; +var global = this; +function f() { return this===global;}; assert((function () {"use strict"; return f.call(null); })()); diff --git a/test/language/function-code/10.4.3-1-91gs.js b/test/language/function-code/10.4.3-1-91gs.js index 6788d0c71..c4d5d4991 100644 --- a/test/language/function-code/10.4.3-1-91gs.js +++ b/test/language/function-code/10.4.3-1-91gs.js @@ -7,10 +7,10 @@ description: > Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(null)) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; +var global = this; +function f() { return this===global;}; if (! ((function () {"use strict"; return f.call(null); })())){ throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-92-s.js b/test/language/function-code/10.4.3-1-92-s.js index 0f0993db9..7b65d705e 100644 --- a/test/language/function-code/10.4.3-1-92-s.js +++ b/test/language/function-code/10.4.3-1-92-s.js @@ -7,8 +7,8 @@ description: > Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(undefined)) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; +var global = this; +function f() { return this===global;}; assert((function () {"use strict"; return f.call(undefined);})()); diff --git a/test/language/function-code/10.4.3-1-92gs.js b/test/language/function-code/10.4.3-1-92gs.js index d747d4cda..36d715c59 100644 --- a/test/language/function-code/10.4.3-1-92gs.js +++ b/test/language/function-code/10.4.3-1-92gs.js @@ -7,10 +7,10 @@ description: > Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(undefined)) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; +var global = this; +function f() { return this===global;}; if (! ((function () {"use strict"; return f.call(undefined);})())){ throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-94-s.js b/test/language/function-code/10.4.3-1-94-s.js index cee5d0555..1223208c5 100644 --- a/test/language/function-code/10.4.3-1-94-s.js +++ b/test/language/function-code/10.4.3-1-94-s.js @@ -7,8 +7,8 @@ description: > Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.call(globalObject)) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; -assert((function () {"use strict"; return f.call(fnGlobalObject());})()); +var global = this; +function f() { return this===global;}; +assert((function () {"use strict"; return f.call(global);})()); diff --git a/test/language/function-code/10.4.3-1-94gs.js b/test/language/function-code/10.4.3-1-94gs.js index 56f4481d8..9e4be26e2 100644 --- a/test/language/function-code/10.4.3-1-94gs.js +++ b/test/language/function-code/10.4.3-1-94gs.js @@ -7,10 +7,10 @@ description: > Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.call(globalObject)) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.call(fnGlobalObject());})())){ +var global = this; +function f() { return this===global;}; +if (! ((function () {"use strict"; return f.call(global);})())){ throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-95-s.js b/test/language/function-code/10.4.3-1-95-s.js index 4148fd9a4..ad34354a8 100644 --- a/test/language/function-code/10.4.3-1-95-s.js +++ b/test/language/function-code/10.4.3-1-95-s.js @@ -7,8 +7,8 @@ description: > Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind()()) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; +var global = this; +function f() { return this===global;}; assert((function () {"use strict"; return f.bind()(); })()); diff --git a/test/language/function-code/10.4.3-1-95gs.js b/test/language/function-code/10.4.3-1-95gs.js index ac799f4d1..776a61221 100644 --- a/test/language/function-code/10.4.3-1-95gs.js +++ b/test/language/function-code/10.4.3-1-95gs.js @@ -7,10 +7,10 @@ description: > Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind()()) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; +var global = this; +function f() { return this===global;}; if (! ((function () {"use strict"; return f.bind()(); })())){ throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-96-s.js b/test/language/function-code/10.4.3-1-96-s.js index 8e5a67919..480f89cba 100644 --- a/test/language/function-code/10.4.3-1-96-s.js +++ b/test/language/function-code/10.4.3-1-96-s.js @@ -7,8 +7,8 @@ description: > Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(null)()) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; +var global = this; +function f() { return this===global;}; assert((function () {"use strict"; return f.bind(null)(); })()); diff --git a/test/language/function-code/10.4.3-1-96gs.js b/test/language/function-code/10.4.3-1-96gs.js index f1709b7e4..1eb5d2d07 100644 --- a/test/language/function-code/10.4.3-1-96gs.js +++ b/test/language/function-code/10.4.3-1-96gs.js @@ -7,10 +7,10 @@ description: > Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(null)()) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; +var global = this; +function f() { return this===global;}; if (! ((function () {"use strict"; return f.bind(null)(); })())){ throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-97-s.js b/test/language/function-code/10.4.3-1-97-s.js index 1eded33e6..b3babc836 100644 --- a/test/language/function-code/10.4.3-1-97-s.js +++ b/test/language/function-code/10.4.3-1-97-s.js @@ -7,8 +7,8 @@ description: > Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(undefined)()) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; +var global = this; +function f() { return this===global;}; assert((function () {"use strict"; return f.bind(undefined)();})()); diff --git a/test/language/function-code/10.4.3-1-97gs.js b/test/language/function-code/10.4.3-1-97gs.js index 800031a36..68b5a6195 100644 --- a/test/language/function-code/10.4.3-1-97gs.js +++ b/test/language/function-code/10.4.3-1-97gs.js @@ -7,10 +7,10 @@ description: > Strict - checking 'this' from a global scope (non-strict function declaration called by strict Function.prototype.bind(undefined)()) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; +var global = this; +function f() { return this===global;}; if (! ((function () {"use strict"; return f.bind(undefined)(); })())){ throw "'this' had incorrect value!"; } diff --git a/test/language/function-code/10.4.3-1-99-s.js b/test/language/function-code/10.4.3-1-99-s.js index 081abf47b..2327b4dee 100644 --- a/test/language/function-code/10.4.3-1-99-s.js +++ b/test/language/function-code/10.4.3-1-99-s.js @@ -7,8 +7,8 @@ description: > Strict Mode - checking 'this' (non-strict function declaration called by strict Function.prototype.bind(globalObject)()) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; -assert((function () {"use strict"; return f.bind(fnGlobalObject())();})()); +var global = this; +function f() { return this===global;}; +assert((function () {"use strict"; return f.bind(global)();})()); diff --git a/test/language/function-code/10.4.3-1-99gs.js b/test/language/function-code/10.4.3-1-99gs.js index 6cf1d8153..fb85ebbbd 100644 --- a/test/language/function-code/10.4.3-1-99gs.js +++ b/test/language/function-code/10.4.3-1-99gs.js @@ -8,10 +8,10 @@ description: > declaration called by strict Function.prototype.bind(globalObject)()) flags: [noStrict] -includes: [fnGlobalObject.js] ---*/ -function f() { return this===fnGlobalObject();}; -if (! ((function () {"use strict"; return f.bind(fnGlobalObject())();})())){ +var global = this; +function f() { return this===global;}; +if (! ((function () {"use strict"; return f.bind(global)();})())){ throw "'this' had incorrect value!"; } diff --git a/test/language/identifier-resolution/unscopables.js b/test/language/identifier-resolution/unscopables.js index d9de44ff5..c40621aa9 100644 --- a/test/language/identifier-resolution/unscopables.js +++ b/test/language/identifier-resolution/unscopables.js @@ -3,7 +3,6 @@ /*--- es6id: 8.1.1.4.1 -includes: [fnGlobalObject.js] description: > `Symbol.unscopables` is not referenced when finding bindings in global scope info: > @@ -17,7 +16,7 @@ features: [Symbol.unscopables] ---*/ var x = 86; -fnGlobalObject()[Symbol.unscopables] = { +this[Symbol.unscopables] = { x: true }; assert.sameValue(x, 86); diff --git a/test/language/statements/try/12.14-14.js b/test/language/statements/try/12.14-14.js index 2921b62df..cbf9e1226 100644 --- a/test/language/statements/try/12.14-14.js +++ b/test/language/statements/try/12.14-14.js @@ -7,10 +7,10 @@ description: > Exception object is a function, when an exception parameter is called as a function in catch block, global object is passed as the this value -includes: [fnGlobalObject.js] flags: [noStrict] ---*/ +var global = this; var result; (function() { @@ -20,7 +20,7 @@ var result; }; } catch (e) { e(); - result = fnGlobalObject()._12_14_14_foo; + result = global._12_14_14_foo; } })(); diff --git a/test/language/statements/try/12.14-15.js b/test/language/statements/try/12.14-15.js index fbbda820b..47a0b84f1 100644 --- a/test/language/statements/try/12.14-15.js +++ b/test/language/statements/try/12.14-15.js @@ -7,10 +7,10 @@ description: > Exception object is a function which is a property of an object, when an exception parameter is called as a function in catch block, global object is passed as the this value -includes: [fnGlobalObject.js] flags: [noStrict] ---*/ +var global = this; var result; (function() { @@ -22,7 +22,7 @@ var result; throw obj.test; } catch (e) { e(); - result = fnGlobalObject()._12_14_15_foo; + result = global._12_14_15_foo; } })(); diff --git a/test/language/statements/try/12.14-16.js b/test/language/statements/try/12.14-16.js index 24656a0b0..bfb6c2269 100644 --- a/test/language/statements/try/12.14-16.js +++ b/test/language/statements/try/12.14-16.js @@ -7,10 +7,10 @@ description: > Exception object is a function which update in catch block, when an exception parameter is called as a function in catch block, global object is passed as the this value -includes: [fnGlobalObject.js] flags: [noStrict] ---*/ +var global = this; var result; (function() { @@ -25,7 +25,7 @@ var result; }; e = obj.test; e(); - result = fnGlobalObject()._12_14_16_foo; + result = global._12_14_16_foo; } })(); |