summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pennisi <mike@mikepennisi.com>2016-04-22 13:07:00 -0400
committerGorkem Yakin <goyakin@microsoft.com>2016-04-25 11:09:21 -0700
commiteb644bb2da80a294282c4d98ad6fdef0bde5562f (patch)
treeda0ff0882600854fb373bda83fc2f3780361e206
parent9aa4dced8d8afbe114b16650187ebb14c3e21e01 (diff)
downloadqtdeclarative-testsuites-eb644bb2da80a294282c4d98ad6fdef0bde5562f.tar.gz
Reduce reliance on `fnGlobalObject.js`
This harness function is not necessary in the majority of cases in which it is used. Remove its usage to simplify tests and decrease the amount of domain-specific knowledge necessary to contribute to the test suite. Persist the harness function itself for use by future tests for ES2015 modules (such a helper is necessary for tests that are interpreted as module code).
-rw-r--r--test/annexB/built-ins/escape/B.2.1.js6
-rw-r--r--test/annexB/built-ins/unescape/B.2.2.js12
-rw-r--r--test/built-ins/Array/isArray/15.4.3.2-1-15.js3
-rw-r--r--test/built-ins/Array/prototype/every/15.4.4.16-2-15.js15
-rw-r--r--test/built-ins/Array/prototype/every/15.4.4.16-5-1.js5
-rw-r--r--test/built-ins/Array/prototype/every/15.4.4.16-5-21.js6
-rw-r--r--test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-23.js9
-rw-r--r--test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-27.js4
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-2-15.js13
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-23.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js4
-rw-r--r--test/built-ins/Array/prototype/forEach/15.4.4.18-2-15.js13
-rw-r--r--test/built-ins/Array/prototype/forEach/15.4.4.18-5-21.js6
-rw-r--r--test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-23.js9
-rw-r--r--test/built-ins/Array/prototype/indexOf/15.4.4.14-1-17.js9
-rw-r--r--test/built-ins/Array/prototype/indexOf/15.4.4.14-2-15.js15
-rw-r--r--test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-23.js17
-rw-r--r--test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-17.js9
-rw-r--r--test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-15.js15
-rw-r--r--test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-19.js3
-rw-r--r--test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-23.js17
-rw-r--r--test/built-ins/Array/prototype/map/15.4.4.19-2-15.js13
-rw-r--r--test/built-ins/Array/prototype/map/15.4.4.19-5-1.js3
-rw-r--r--test/built-ins/Array/prototype/map/15.4.4.19-5-21.js6
-rw-r--r--test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-23.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-2-15.js13
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-23.js13
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-23.js11
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js6
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-15.js16
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-23.js13
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-23.js13
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-37.js6
-rw-r--r--test/built-ins/Array/prototype/some/15.4.4.17-2-15.js15
-rw-r--r--test/built-ins/Array/prototype/some/15.4.4.17-5-21.js6
-rw-r--r--test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-23.js9
-rw-r--r--test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-26.js4
-rw-r--r--test/built-ins/Function/15.3.5.4_2-64gs.js4
-rw-r--r--test/built-ins/Function/15.3.5.4_2-69gs.js4
-rw-r--r--test/built-ins/Function/15.3.5.4_2-74gs.js4
-rw-r--r--test/built-ins/Function/15.3.5.4_2-83gs.js4
-rw-r--r--test/built-ins/Function/15.3.5.4_2-88gs.js4
-rw-r--r--test/built-ins/Function/15.3.5.4_2-93gs.js4
-rw-r--r--test/built-ins/Infinity/15.1.1.2-0.js3
-rwxr-xr-xtest/built-ins/Infinity/S15.1.1.2_A2_T1.js4
-rw-r--r--test/built-ins/Infinity/S15.1.1.2_A3_T1.js6
-rw-r--r--test/built-ins/NaN/15.1.1.1-0.js3
-rwxr-xr-xtest/built-ins/NaN/S15.1.1.1_A2_T1.js4
-rw-r--r--test/built-ins/NaN/S15.1.1.1_A3_T1.js6
-rw-r--r--test/built-ins/Object/create/15.2.3.5-4-124.js5
-rw-r--r--test/built-ins/Object/create/15.2.3.5-4-149.js3
-rw-r--r--test/built-ins/Object/create/15.2.3.5-4-177.js5
-rw-r--r--test/built-ins/Object/create/15.2.3.5-4-203.js5
-rw-r--r--test/built-ins/Object/create/15.2.3.5-4-228.js3
-rw-r--r--test/built-ins/Object/create/15.2.3.5-4-256.js5
-rw-r--r--test/built-ins/Object/create/15.2.3.5-4-291.js5
-rw-r--r--test/built-ins/Object/create/15.2.3.5-4-300.js4
-rw-r--r--test/built-ins/Object/create/15.2.3.5-4-71.js5
-rw-r--r--test/built-ins/Object/create/15.2.3.5-4-96.js3
-rw-r--r--test/built-ins/Object/defineProperties/15.2.3.7-2-18.js10
-rw-r--r--test/built-ins/Object/defineProperties/15.2.3.7-5-b-109.js3
-rw-r--r--test/built-ins/Object/defineProperties/15.2.3.7-5-b-137.js5
-rw-r--r--test/built-ins/Object/defineProperties/15.2.3.7-5-b-163.js8
-rw-r--r--test/built-ins/Object/defineProperties/15.2.3.7-5-b-188.js3
-rw-r--r--test/built-ins/Object/defineProperties/15.2.3.7-5-b-216.js5
-rw-r--r--test/built-ins/Object/defineProperties/15.2.3.7-5-b-31.js5
-rw-r--r--test/built-ins/Object/defineProperties/15.2.3.7-5-b-56.js3
-rw-r--r--test/built-ins/Object/defineProperties/15.2.3.7-5-b-84.js5
-rw-r--r--test/built-ins/Object/defineProperties/15.2.3.7-6-a-24.js16
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-3-123.js3
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-3-151.js5
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-3-177.js5
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-3-202.js3
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-3-230.js5
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-3-260.js5
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-3-45.js5
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-3-70.js3
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-3-98.js5
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-4-354-13.js4
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-4-354-2.js2
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-4-354-4.js4
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-4-354-8.js6
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-4-360-3.js6
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-4-360-7.js4
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-4-399.js7
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-4-45.js12
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-4-531-13.js4
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-4-531-17.js3
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-4-531-4.js4
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-4-531-8.js6
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-4-538-3.js4
-rw-r--r--test/built-ins/Object/defineProperty/15.2.3.6-4-538-7.js4
-rw-r--r--test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-10.js3
-rw-r--r--test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-11.js3
-rw-r--r--test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-178.js3
-rw-r--r--test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-179.js3
-rw-r--r--test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-180.js3
-rw-r--r--test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-4.js3
-rw-r--r--test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-5.js3
-rw-r--r--test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-6.js3
-rw-r--r--test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-7.js3
-rw-r--r--test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-8.js3
-rw-r--r--test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-9.js3
-rw-r--r--test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-global-object.js3
-rw-r--r--test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-1.js3
-rw-r--r--test/built-ins/Object/getPrototypeOf/15.2.3.2-2-30.js5
-rw-r--r--test/built-ins/Object/isExtensible/15.2.3.13-2-1.js3
-rw-r--r--test/built-ins/Object/isExtensible/15.2.3.13-2-29.js3
-rw-r--r--test/built-ins/Object/isFrozen/15.2.3.12-3-1.js3
-rw-r--r--test/built-ins/Object/isSealed/15.2.3.11-4-1.js3
-rw-r--r--test/built-ins/Object/keys/15.2.3.14-6-6.js3
-rw-r--r--test/built-ins/Promise/S25.4.3.1_A1.1_T1.js3
-rw-r--r--test/built-ins/Promise/S25.4.3.1_A5.1_T1.js3
-rw-r--r--test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-invoke-nonstrict.js3
-rw-r--r--test/built-ins/Promise/prototype/then/rxn-handler-rejected-invoke-nonstrict.js3
-rw-r--r--test/built-ins/RegExp/prototype/Symbol.replace/fn-invoke-this-no-strict.js3
-rw-r--r--test/built-ins/String/prototype/match/S15.5.4.10_A1_T3.js7
-rw-r--r--test/built-ins/String/prototype/replace/15.5.4.11-1.js4
-rw-r--r--test/built-ins/TypedArrays/from/mapfn-this-without-thisarg-non-strict.js4
-rw-r--r--test/built-ins/undefined/15.1.1.3-0.js3
-rw-r--r--test/built-ins/undefined/15.1.1.3-2.js3
-rw-r--r--test/built-ins/undefined/S15.1.1.3_A3_T1.js6
-rw-r--r--test/intl402/Intl/8.0_L15.js6
-rw-r--r--test/language/expressions/assignment/11.13.1-4-1.js3
-rw-r--r--test/language/expressions/assignment/11.13.1-4-27-s.js4
-rw-r--r--test/language/expressions/assignment/11.13.1-4-3-s.js5
-rwxr-xr-xtest/language/expressions/assignment/S11.13.1_A5_T5.js11
-rwxr-xr-xtest/language/expressions/compound-assignment/S11.13.2_A5.10_T5.js8
-rwxr-xr-xtest/language/expressions/compound-assignment/S11.13.2_A5.11_T5.js8
-rwxr-xr-xtest/language/expressions/compound-assignment/S11.13.2_A5.1_T5.js8
-rwxr-xr-xtest/language/expressions/compound-assignment/S11.13.2_A5.2_T5.js8
-rwxr-xr-xtest/language/expressions/compound-assignment/S11.13.2_A5.3_T5.js8
-rwxr-xr-xtest/language/expressions/compound-assignment/S11.13.2_A5.4_T5.js8
-rwxr-xr-xtest/language/expressions/compound-assignment/S11.13.2_A5.5_T5.js8
-rwxr-xr-xtest/language/expressions/compound-assignment/S11.13.2_A5.6_T5.js8
-rwxr-xr-xtest/language/expressions/compound-assignment/S11.13.2_A5.7_T5.js8
-rwxr-xr-xtest/language/expressions/compound-assignment/S11.13.2_A5.8_T5.js8
-rwxr-xr-xtest/language/expressions/compound-assignment/S11.13.2_A5.9_T5.js8
-rw-r--r--test/language/expressions/delete/11.4.1-4.a-8-s.js4
-rwxr-xr-xtest/language/expressions/postfix-decrement/S11.3.2_A5_T5.js8
-rwxr-xr-xtest/language/expressions/postfix-increment/S11.3.1_A5_T5.js8
-rwxr-xr-xtest/language/expressions/prefix-decrement/S11.4.5_A5_T5.js8
-rwxr-xr-xtest/language/expressions/prefix-increment/S11.4.4_A5_T5.js8
-rw-r--r--test/language/function-code/10.4.3-1-101-s.js3
-rw-r--r--test/language/function-code/10.4.3-1-101gs.js3
-rw-r--r--test/language/function-code/10.4.3-1-17-s.js5
-rw-r--r--test/language/function-code/10.4.3-1-17gs.js3
-rw-r--r--test/language/function-code/10.4.3-1-18gs.js3
-rw-r--r--test/language/function-code/10.4.3-1-19-s.js5
-rw-r--r--test/language/function-code/10.4.3-1-19gs.js3
-rw-r--r--test/language/function-code/10.4.3-1-20-s.js5
-rw-r--r--test/language/function-code/10.4.3-1-20gs.js3
-rw-r--r--test/language/function-code/10.4.3-1-21-s.js3
-rw-r--r--test/language/function-code/10.4.3-1-21gs.js3
-rw-r--r--test/language/function-code/10.4.3-1-22-s.js3
-rw-r--r--test/language/function-code/10.4.3-1-22gs.js3
-rw-r--r--test/language/function-code/10.4.3-1-23-s.js3
-rw-r--r--test/language/function-code/10.4.3-1-23gs.js3
-rw-r--r--test/language/function-code/10.4.3-1-24-s.js3
-rw-r--r--test/language/function-code/10.4.3-1-24gs.js3
-rw-r--r--test/language/function-code/10.4.3-1-25-s.js3
-rw-r--r--test/language/function-code/10.4.3-1-25gs.js3
-rw-r--r--test/language/function-code/10.4.3-1-26-s.js3
-rw-r--r--test/language/function-code/10.4.3-1-26gs.js3
-rw-r--r--test/language/function-code/10.4.3-1-45-s.js5
-rw-r--r--test/language/function-code/10.4.3-1-45gs.js5
-rw-r--r--test/language/function-code/10.4.3-1-46-s.js5
-rw-r--r--test/language/function-code/10.4.3-1-46gs.js5
-rw-r--r--test/language/function-code/10.4.3-1-47-s.js5
-rw-r--r--test/language/function-code/10.4.3-1-47gs.js5
-rw-r--r--test/language/function-code/10.4.3-1-48-s.js5
-rw-r--r--test/language/function-code/10.4.3-1-48gs.js5
-rw-r--r--test/language/function-code/10.4.3-1-49-s.js5
-rw-r--r--test/language/function-code/10.4.3-1-49gs.js5
-rw-r--r--test/language/function-code/10.4.3-1-50-s.js5
-rw-r--r--test/language/function-code/10.4.3-1-50gs.js5
-rw-r--r--test/language/function-code/10.4.3-1-51-s.js5
-rw-r--r--test/language/function-code/10.4.3-1-51gs.js5
-rw-r--r--test/language/function-code/10.4.3-1-52-s.js5
-rw-r--r--test/language/function-code/10.4.3-1-52gs.js5
-rw-r--r--test/language/function-code/10.4.3-1-53-s.js5
-rw-r--r--test/language/function-code/10.4.3-1-53gs.js5
-rw-r--r--test/language/function-code/10.4.3-1-64-s.js3
-rw-r--r--test/language/function-code/10.4.3-1-65-s.js3
-rw-r--r--test/language/function-code/10.4.3-1-70-s.js3
-rw-r--r--test/language/function-code/10.4.3-1-70gs.js3
-rw-r--r--test/language/function-code/10.4.3-1-75-s.js3
-rw-r--r--test/language/function-code/10.4.3-1-75gs.js3
-rw-r--r--test/language/function-code/10.4.3-1-80-s.js3
-rw-r--r--test/language/function-code/10.4.3-1-80gs.js3
-rw-r--r--test/language/function-code/10.4.3-1-83-s.js3
-rw-r--r--test/language/function-code/10.4.3-1-84-s.js3
-rw-r--r--test/language/function-code/10.4.3-1-86-s.js4
-rw-r--r--test/language/function-code/10.4.3-1-86gs.js4
-rw-r--r--test/language/function-code/10.4.3-1-87-s.js4
-rw-r--r--test/language/function-code/10.4.3-1-87gs.js4
-rw-r--r--test/language/function-code/10.4.3-1-89-s.js4
-rw-r--r--test/language/function-code/10.4.3-1-89gs.js4
-rw-r--r--test/language/function-code/10.4.3-1-90-s.js4
-rw-r--r--test/language/function-code/10.4.3-1-90gs.js4
-rw-r--r--test/language/function-code/10.4.3-1-91-s.js4
-rw-r--r--test/language/function-code/10.4.3-1-91gs.js4
-rw-r--r--test/language/function-code/10.4.3-1-92-s.js4
-rw-r--r--test/language/function-code/10.4.3-1-92gs.js4
-rw-r--r--test/language/function-code/10.4.3-1-94-s.js6
-rw-r--r--test/language/function-code/10.4.3-1-94gs.js6
-rw-r--r--test/language/function-code/10.4.3-1-95-s.js4
-rw-r--r--test/language/function-code/10.4.3-1-95gs.js4
-rw-r--r--test/language/function-code/10.4.3-1-96-s.js4
-rw-r--r--test/language/function-code/10.4.3-1-96gs.js4
-rw-r--r--test/language/function-code/10.4.3-1-97-s.js4
-rw-r--r--test/language/function-code/10.4.3-1-97gs.js4
-rw-r--r--test/language/function-code/10.4.3-1-99-s.js6
-rw-r--r--test/language/function-code/10.4.3-1-99gs.js6
-rw-r--r--test/language/identifier-resolution/unscopables.js3
-rw-r--r--test/language/statements/try/12.14-14.js4
-rw-r--r--test/language/statements/try/12.14-15.js4
-rw-r--r--test/language/statements/try/12.14-16.js4
219 files changed, 523 insertions, 658 deletions
diff --git a/test/annexB/built-ins/escape/B.2.1.js b/test/annexB/built-ins/escape/B.2.1.js
index 2c0ee0326..6c23ce760 100644
--- a/test/annexB/built-ins/escape/B.2.1.js
+++ b/test/annexB/built-ins/escape/B.2.1.js
@@ -6,12 +6,10 @@ es5id: B.2.1
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Global.escape)
-includes:
- - fnGlobalObject.js
- - propertyHelper.js
+includes: [propertyHelper.js]
---*/
-var global = fnGlobalObject();
+var global = this;
verifyWritable(global, "escape");
verifyNotEnumerable(global, "escape");
diff --git a/test/annexB/built-ins/unescape/B.2.2.js b/test/annexB/built-ins/unescape/B.2.2.js
index 2b37c3a21..04e65cf55 100644
--- a/test/annexB/built-ins/unescape/B.2.2.js
+++ b/test/annexB/built-ins/unescape/B.2.2.js
@@ -6,13 +6,9 @@ es5id: B.2.2
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Global.unescape)
-includes:
- - fnGlobalObject.js
- - propertyHelper.js
+includes: [propertyHelper.js]
---*/
-var global = fnGlobalObject();
-
-verifyWritable(global, "unescape");
-verifyNotEnumerable(global, "unescape");
-verifyConfigurable(global, "unescape");
+verifyWritable(this, "unescape");
+verifyNotEnumerable(this, "unescape");
+verifyConfigurable(this, "unescape");
diff --git a/test/built-ins/Array/isArray/15.4.3.2-1-15.js b/test/built-ins/Array/isArray/15.4.3.2-1-15.js
index 048859180..cb1f0e5c5 100644
--- a/test/built-ins/Array/isArray/15.4.3.2-1-15.js
+++ b/test/built-ins/Array/isArray/15.4.3.2-1-15.js
@@ -4,7 +4,6 @@
/*---
es5id: 15.4.3.2-1-15
description: Array.isArray applied to the global object
-includes: [fnGlobalObject.js]
---*/
-assert.sameValue(Array.isArray(fnGlobalObject()), false, 'Array.isArray(fnGlobalObject())');
+assert.sameValue(Array.isArray(this), false, 'Array.isArray(this)');
diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-15.js
index e8e4f7111..af5eb35c4 100644
--- a/test/built-ins/Array/prototype/every/15.4.4.16-2-15.js
+++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-15.js
@@ -4,7 +4,6 @@
/*---
es5id: 15.4.4.16-2-15
description: Array.prototype.every - 'length' is property of the global object
-includes: [fnGlobalObject.js]
---*/
function callbackfn1(val, idx, obj) {
@@ -15,11 +14,11 @@ includes: [fnGlobalObject.js]
return val > 11;
}
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = 12;
- fnGlobalObject()[1] = 11;
- fnGlobalObject()[2] = 9;
- fnGlobalObject().length = 2;
+ var oldLen = this.length;
+ this[0] = 12;
+ this[1] = 11;
+ this[2] = 9;
+ this.length = 2;
-assert(Array.prototype.every.call(fnGlobalObject(), callbackfn1), 'Array.prototype.every.call(fnGlobalObject(), callbackfn1) !== true');
-assert.sameValue(Array.prototype.every.call(fnGlobalObject(), callbackfn2), false, 'Array.prototype.every.call(fnGlobalObject(), callbackfn2)');
+assert(Array.prototype.every.call(this, callbackfn1), 'Array.prototype.every.call(this, callbackfn1) !== true');
+assert.sameValue(Array.prototype.every.call(this, callbackfn2), false, 'Array.prototype.every.call(this, callbackfn2)');
diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-1.js
index 35a3031c8..49814e8df 100644
--- a/test/built-ins/Array/prototype/every/15.4.4.16-5-1.js
+++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-1.js
@@ -5,12 +5,13 @@
es5id: 15.4.4.16-5-1
description: Array.prototype.every - thisArg not passed
flags: [noStrict]
-includes: [fnGlobalObject.js]
---*/
+var global = this;
+
function callbackfn(val, idx, obj)
{
- return this === fnGlobalObject();
+ return this === global;
}
var arr = [1];
diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-21.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-21.js
index 816ddb5b8..20d55ddae 100644
--- a/test/built-ins/Array/prototype/every/15.4.4.16-5-21.js
+++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-21.js
@@ -4,15 +4,15 @@
/*---
es5id: 15.4.4.16-5-21
description: Array.prototype.every - the global object can be used as thisArg
-includes: [fnGlobalObject.js]
---*/
+var global = this;
var accessed = false;
function callbackfn(val, idx, obj) {
accessed = true;
- return this === fnGlobalObject();
+ return this === global;
}
-assert([11].every(callbackfn, fnGlobalObject()), '[11].every(callbackfn, fnGlobalObject()) !== true');
+assert([11].every(callbackfn, global), '[11].every(callbackfn, global) !== true');
assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-23.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-23.js
index 5dcc93e3a..a0dc517b8 100644
--- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-23.js
+++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-23.js
@@ -6,7 +6,6 @@ es5id: 15.4.4.16-7-c-i-23
description: >
Array.prototype.every - This object is an global object which
contains index property
-includes: [fnGlobalObject.js]
---*/
function callbackfn(val, idx, obj) {
@@ -17,8 +16,8 @@ includes: [fnGlobalObject.js]
}
}
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = 11;
- fnGlobalObject().length = 1;
+ var oldLen = this.length;
+ this[0] = 11;
+ this.length = 1;
-assert.sameValue(Array.prototype.every.call(fnGlobalObject(), callbackfn), false, 'Array.prototype.every.call(fnGlobalObject(), callbackfn)');
+assert.sameValue(Array.prototype.every.call(this, callbackfn), false, 'Array.prototype.every.call(this, callbackfn)');
diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-27.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-27.js
index 148fdd1e8..c594820d7 100644
--- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-27.js
+++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-27.js
@@ -6,14 +6,14 @@ es5id: 15.4.4.16-7-c-iii-27
description: >
Array.prototype.every - return value of callbackfn is the global
object
-includes: [fnGlobalObject.js]
---*/
+var global = this;
var accessed = false;
function callbackfn(val, idx, obj) {
accessed = true;
- return fnGlobalObject();
+ return global;
}
assert([11].every(callbackfn), '[11].every(callbackfn) !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-15.js
index 70ab8e9e4..f94697a84 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-15.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-15.js
@@ -4,18 +4,17 @@
/*---
es5id: 15.4.4.20-2-15
description: Array.prototype.filter - 'length' is property of the global object
-includes: [fnGlobalObject.js]
---*/
function callbackfn(val, idx, obj) {
return obj.length === 2;
}
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = 12;
- fnGlobalObject()[1] = 11;
- fnGlobalObject()[2] = 9;
- fnGlobalObject().length = 2;
- var newArr = Array.prototype.filter.call(fnGlobalObject(), callbackfn);
+ var oldLen = this.length;
+ this[0] = 12;
+ this[1] = 11;
+ this[2] = 9;
+ this.length = 2;
+ var newArr = Array.prototype.filter.call(this, callbackfn);
assert.sameValue(newArr.length, 2, 'newArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js
index a181811ef..6a21b9fbf 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js
@@ -4,17 +4,18 @@
/*---
es5id: 15.4.4.20-5-21
description: Array.prototype.filter - the global object can be used as thisArg
-includes: [fnGlobalObject.js]
---*/
+var global = this;
+
var accessed = false;
function callbackfn(val, idx, obj) {
accessed = true;
- return this === fnGlobalObject();
+ return this === global;
}
- var newArr = [11].filter(callbackfn, fnGlobalObject());
+ var newArr = [11].filter(callbackfn, global);
assert.sameValue(newArr[0], 11, 'newArr[0]');
assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-23.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-23.js
index a6a8070f5..4bce20357 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-23.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-23.js
@@ -6,17 +6,16 @@ es5id: 15.4.4.20-9-c-i-23
description: >
Array.prototype.filter - This object is the global object which
contains index property
-includes: [fnGlobalObject.js]
---*/
function callbackfn(val, idx, obj) {
return idx === 0 && val === 11;
}
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = 11;
- fnGlobalObject().length = 1;
- var newArr = Array.prototype.filter.call(fnGlobalObject(), callbackfn);
+ var oldLen = this.length;
+ this[0] = 11;
+ this.length = 1;
+ var newArr = Array.prototype.filter.call(this, callbackfn);
assert.sameValue(newArr.length, 1, 'newArr.length');
assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js
index 4bd224f22..9b7f49628 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js
@@ -6,11 +6,11 @@ es5id: 15.4.4.20-9-c-iii-28
description: >
Array.prototype.filter - return value of callbackfn is the global
object
-includes: [fnGlobalObject.js]
---*/
+var global = this;
function callbackfn(val, idx, obj) {
- return fnGlobalObject();
+ return global;
}
var newArr = [11].filter(callbackfn);
diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-15.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-15.js
index 4ffc305bd..c5217d655 100644
--- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-15.js
+++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-15.js
@@ -4,7 +4,6 @@
/*---
es5id: 15.4.4.18-2-15
description: Array.prototype.forEach - 'length' is property of the global object
-includes: [fnGlobalObject.js]
---*/
var result = false;
@@ -12,11 +11,11 @@ includes: [fnGlobalObject.js]
result = (obj.length === 2);
}
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = 12;
- fnGlobalObject()[1] = 11;
- fnGlobalObject()[2] = 9;
- fnGlobalObject().length = 2;
- Array.prototype.forEach.call(fnGlobalObject(), callbackfn);
+ var oldLen = this.length;
+ this[0] = 12;
+ this[1] = 11;
+ this[2] = 9;
+ this.length = 2;
+ Array.prototype.forEach.call(this, callbackfn);
assert(result, 'result !== true');
diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-21.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-21.js
index a33397907..49fb6cdcd 100644
--- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-21.js
+++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-21.js
@@ -4,14 +4,14 @@
/*---
es5id: 15.4.4.18-5-21
description: Array.prototype.forEach - the global object can be used as thisArg
-includes: [fnGlobalObject.js]
---*/
+var global = this;
var result = false;
function callbackfn(val, idx, obj) {
- result = (this === fnGlobalObject());
+ result = (this === global);
}
- [11].forEach(callbackfn, fnGlobalObject());
+ [11].forEach(callbackfn, this);
assert(result, 'result !== true');
diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-23.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-23.js
index 7818c59d7..3358cfde5 100644
--- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-23.js
+++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-23.js
@@ -6,7 +6,6 @@ es5id: 15.4.4.18-7-c-i-23
description: >
Array.prototype.forEach - This object is an global object which
contains index property
-includes: [fnGlobalObject.js]
---*/
var testResult = false;
@@ -17,10 +16,10 @@ includes: [fnGlobalObject.js]
}
}
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = 11;
- fnGlobalObject().length = 1;
+ var oldLen = this.length;
+ this[0] = 11;
+ this.length = 1;
- Array.prototype.forEach.call(fnGlobalObject(), callbackfn);
+ Array.prototype.forEach.call(this, callbackfn);
assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-17.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-17.js
index 375445d10..7333b2369 100644
--- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-17.js
+++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-17.js
@@ -4,11 +4,10 @@
/*---
es5id: 15.4.4.14-1-17
description: Array.prototype.indexOf applied to the global object
-includes: [fnGlobalObject.js]
---*/
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[1] = true;
- fnGlobalObject().length = 2;
+ var oldLen = this.length;
+ this[1] = true;
+ this.length = 2;
-assert.sameValue(Array.prototype.indexOf.call(fnGlobalObject(), true), 1, 'Array.prototype.indexOf.call(fnGlobalObject(), true)');
+assert.sameValue(Array.prototype.indexOf.call(this, true), 1, 'Array.prototype.indexOf.call(this, true)');
diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-15.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-15.js
index 5ccbbf084..61b0c6938 100644
--- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-15.js
+++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-15.js
@@ -4,19 +4,18 @@
/*---
es5id: 15.4.4.14-2-15
description: Array.prototype.indexOf - 'length' is property of the global object
-includes: [fnGlobalObject.js]
---*/
var targetObj = {};
- var oldLen = fnGlobalObject().length;
- fnGlobalObject().length = 2;
+ var oldLen = this.length;
+ this.length = 2;
- fnGlobalObject()[1] = targetObj;
+ this[1] = targetObj;
-assert.sameValue(Array.prototype.indexOf.call(fnGlobalObject(), targetObj), 1, 'Array.prototype.indexOf.call(fnGlobalObject(), targetObj)');
+assert.sameValue(Array.prototype.indexOf.call(this, targetObj), 1, 'Array.prototype.indexOf.call(this, targetObj)');
- fnGlobalObject()[1] = {};
- fnGlobalObject()[2] = targetObj;
+ this[1] = {};
+ this[2] = targetObj;
-assert.sameValue(Array.prototype.indexOf.call(fnGlobalObject(), targetObj), -1, 'Array.prototype.indexOf.call(fnGlobalObject(), targetObj)');
+assert.sameValue(Array.prototype.indexOf.call(this, targetObj), -1, 'Array.prototype.indexOf.call(this, targetObj)');
diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-23.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-23.js
index 0b4a011ae..a9d706667 100644
--- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-23.js
+++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-23.js
@@ -4,17 +4,16 @@
/*---
es5id: 15.4.4.14-9-b-i-23
description: Array.prototype.indexOf - This object is the global object
-includes: [fnGlobalObject.js]
---*/
var targetObj = {};
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = targetObj;
- fnGlobalObject()[100] = "100";
- fnGlobalObject()[200] = "200";
- fnGlobalObject().length = 200;
+ var oldLen = this.length;
+ this[0] = targetObj;
+ this[100] = "100";
+ this[200] = "200";
+ this.length = 200;
-assert.sameValue(Array.prototype.indexOf.call(fnGlobalObject(), targetObj), 0, 'Array.prototype.indexOf.call(fnGlobalObject(), targetObj)');
-assert.sameValue(Array.prototype.indexOf.call(fnGlobalObject(), "100"), 100, 'Array.prototype.indexOf.call(fnGlobalObject(), "100")');
-assert.sameValue(Array.prototype.indexOf.call(fnGlobalObject(), "200"), -1, 'Array.prototype.indexOf.call(fnGlobalObject(), "200")');
+assert.sameValue(Array.prototype.indexOf.call(this, targetObj), 0, 'Array.prototype.indexOf.call(this, targetObj)');
+assert.sameValue(Array.prototype.indexOf.call(this, "100"), 100, 'Array.prototype.indexOf.call(this, "100")');
+assert.sameValue(Array.prototype.indexOf.call(this, "200"), -1, 'Array.prototype.indexOf.call(this, "200")');
diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-17.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-17.js
index d3ce16250..aeeba6c2c 100644
--- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-17.js
+++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-17.js
@@ -4,13 +4,12 @@
/*---
es5id: 15.4.4.15-1-17
description: Array.prototype.lastIndexOf applied to the global object
-includes: [fnGlobalObject.js]
---*/
var targetObj = ["global"];
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[1] = targetObj;
- fnGlobalObject().length = 3;
+ var oldLen = this.length;
+ this[1] = targetObj;
+ this.length = 3;
-assert.sameValue(Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj), 1, 'Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj)');
+assert.sameValue(Array.prototype.lastIndexOf.call(this, targetObj), 1, 'Array.prototype.lastIndexOf.call(this, targetObj)');
diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-15.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-15.js
index c6e5c55e5..2523f266f 100644
--- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-15.js
+++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-15.js
@@ -6,19 +6,18 @@ es5id: 15.4.4.15-2-15
description: >
Array.prototype.lastIndexOf - 'length' is property of the global
object
-includes: [fnGlobalObject.js]
---*/
var targetObj = {};
- var oldLen = fnGlobalObject().length;
- fnGlobalObject().length = 2;
+ var oldLen = this.length;
+ this.length = 2;
- fnGlobalObject()[1] = targetObj;
+ this[1] = targetObj;
-assert.sameValue(Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj), 1);
+assert.sameValue(Array.prototype.lastIndexOf.call(this, targetObj), 1);
- fnGlobalObject()[1] = {};
- fnGlobalObject()[2] = targetObj;
+ this[1] = {};
+ this[2] = targetObj;
-assert.sameValue(Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj), -1);
+assert.sameValue(Array.prototype.lastIndexOf.call(this, targetObj), -1);
diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-19.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-19.js
index 9999575a4..ee41b8cdd 100644
--- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-19.js
+++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-19.js
@@ -6,7 +6,6 @@ es5id: 15.4.4.15-3-19
description: >
Array.prototype.lastIndexOf - value of 'length' is an Object which
has an own toString method
-includes: [fnGlobalObject.js]
---*/
// objects inherit the default valueOf() method from Object
@@ -15,7 +14,7 @@ includes: [fnGlobalObject.js]
// to a number by calling its toString() method and converting the
// resulting string to a number.
- var targetObj = fnGlobalObject();
+ var targetObj = this;
var obj = {
1: targetObj,
2: 2,
diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-23.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-23.js
index 1cae88226..e94974c9b 100644
--- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-23.js
+++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-23.js
@@ -4,17 +4,16 @@
/*---
es5id: 15.4.4.15-8-b-i-23
description: Array.prototype.lastIndexOf - This object is the global object
-includes: [fnGlobalObject.js]
---*/
var targetObj = {};
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = targetObj;
- fnGlobalObject()[100] = "100";
- fnGlobalObject()[200] = "200";
- fnGlobalObject().length = 200;
+ var oldLen = this.length;
+ this[0] = targetObj;
+ this[100] = "100";
+ this[200] = "200";
+ this.length = 200;
-assert.sameValue(Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj), 0, 'Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj)');
-assert.sameValue(Array.prototype.lastIndexOf.call(fnGlobalObject(), "100"), 100, 'Array.prototype.lastIndexOf.call(fnGlobalObject(), "100")');
-assert.sameValue(Array.prototype.lastIndexOf.call(fnGlobalObject(), "200"), -1, 'Array.prototype.lastIndexOf.call(fnGlobalObject(), "200")');
+assert.sameValue(Array.prototype.lastIndexOf.call(this, targetObj), 0, 'Array.prototype.lastIndexOf.call(this, targetObj)');
+assert.sameValue(Array.prototype.lastIndexOf.call(this, "100"), 100, 'Array.prototype.lastIndexOf.call(this, "100")');
+assert.sameValue(Array.prototype.lastIndexOf.call(this, "200"), -1, 'Array.prototype.lastIndexOf.call(this, "200")');
diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-15.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-15.js
index 96ad9dc0d..b1ea68d41 100644
--- a/test/built-ins/Array/prototype/map/15.4.4.19-2-15.js
+++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-15.js
@@ -6,18 +6,17 @@ es5id: 15.4.4.19-2-15
description: >
Array.prototype.map - when 'length' is property of the global
object
-includes: [fnGlobalObject.js]
---*/
function callbackfn(val, idx, obj) {
return val > 10;
}
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = 12;
- fnGlobalObject()[1] = 11;
- fnGlobalObject()[2] = 9;
- fnGlobalObject().length = 2;
- var testResult = Array.prototype.map.call(fnGlobalObject(), callbackfn);
+ var oldLen = this.length;
+ this[0] = 12;
+ this[1] = 11;
+ this[2] = 9;
+ this.length = 2;
+ var testResult = Array.prototype.map.call(this, callbackfn);
assert.sameValue(testResult.length, 2, 'testResult.length');
diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-1.js
index 8ecad2ed0..b660cb768 100644
--- a/test/built-ins/Array/prototype/map/15.4.4.19-5-1.js
+++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-1.js
@@ -5,10 +5,9 @@
es5id: 15.4.4.19-5-1
description: Array.prototype.map - thisArg not passed
flags: [noStrict]
-includes: [fnGlobalObject.js]
---*/
- fnGlobalObject()._15_4_4_19_5_1 = true;
+ this._15_4_4_19_5_1 = true;
(function() {
var _15_4_4_19_5_1 = false;
diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-21.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-21.js
index 099adba0f..6da74b00a 100644
--- a/test/built-ins/Array/prototype/map/15.4.4.19-5-21.js
+++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-21.js
@@ -4,13 +4,13 @@
/*---
es5id: 15.4.4.19-5-21
description: Array.prototype.map - the global object can be used as thisArg
-includes: [fnGlobalObject.js]
---*/
+var global = this;
function callbackfn(val, idx, obj) {
- return this === fnGlobalObject();
+ return this === global;
}
- var testResult = [11].map(callbackfn, fnGlobalObject());
+ var testResult = [11].map(callbackfn, this);
assert.sameValue(testResult[0], true, 'testResult[0]');
diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-23.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-23.js
index d3cb8eddd..3127fa521 100644
--- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-23.js
+++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-23.js
@@ -6,7 +6,6 @@ es5id: 15.4.4.19-8-c-i-23
description: >
Array.prototype.map - This object is the global object which
contains index property
-includes: [fnGlobalObject.js]
---*/
var kValue = "abc";
@@ -18,10 +17,10 @@ includes: [fnGlobalObject.js]
return false;
}
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = kValue;
- fnGlobalObject().length = 2;
+ var oldLen = this.length;
+ this[0] = kValue;
+ this.length = 2;
- var testResult = Array.prototype.map.call(fnGlobalObject(), callbackfn);
+ var testResult = Array.prototype.map.call(this, callbackfn);
assert.sameValue(testResult[0], true, 'testResult[0]');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-15.js
index 136c455d5..215377cc4 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-15.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-15.js
@@ -4,17 +4,16 @@
/*---
es5id: 15.4.4.21-2-15
description: Array.prototype.reduce - 'length' is property of the global object
-includes: [fnGlobalObject.js]
---*/
function callbackfn(prevVal, curVal, idx, obj) {
return (obj.length === 2);
}
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = 12;
- fnGlobalObject()[1] = 11;
- fnGlobalObject()[2] = 9;
- fnGlobalObject().length = 2;
+ var oldLen = this.length;
+ this[0] = 12;
+ this[1] = 11;
+ this[2] = 9;
+ this.length = 2;
-assert.sameValue(Array.prototype.reduce.call(fnGlobalObject(), callbackfn, 1), true, 'Array.prototype.reduce.call(fnGlobalObject(), callbackfn, 1)');
+assert.sameValue(Array.prototype.reduce.call(this, callbackfn, 1), true, 'Array.prototype.reduce.call(this, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-23.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-23.js
index bd3aee02e..eaecf13ea 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-23.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-23.js
@@ -6,7 +6,6 @@ es5id: 15.4.4.21-8-b-iii-1-23
description: >
Array.prototype.reduce - This object is the global object which
contains index property
-includes: [fnGlobalObject.js]
---*/
var testResult = false;
@@ -16,12 +15,12 @@ includes: [fnGlobalObject.js]
}
}
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = 0;
- fnGlobalObject()[1] = 1;
- fnGlobalObject()[2] = 2;
- fnGlobalObject().length = 3;
+ var oldLen = this.length;
+ this[0] = 0;
+ this[1] = 1;
+ this[2] = 2;
+ this.length = 3;
- Array.prototype.reduce.call(fnGlobalObject(), callbackfn);
+ Array.prototype.reduce.call(this, callbackfn);
assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-23.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-23.js
index 7d8ad83f1..92f3f4a9d 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-23.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-23.js
@@ -6,7 +6,6 @@ es5id: 15.4.4.21-9-c-i-23
description: >
Array.prototype.reduce - This object is the global object which
contains index property
-includes: [fnGlobalObject.js]
---*/
var testResult = false;
@@ -17,11 +16,11 @@ includes: [fnGlobalObject.js]
}
}
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = 0;
- fnGlobalObject()[1] = 1;
- fnGlobalObject().length = 2;
+ var oldLen = this.length;
+ this[0] = 0;
+ this[1] = 1;
+ this.length = 2;
- Array.prototype.reduce.call(fnGlobalObject(), callbackfn, initialValue);
+ Array.prototype.reduce.call(this, callbackfn, initialValue);
assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js
index b2a788187..82f1cd87d 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js
@@ -6,16 +6,16 @@ es5id: 15.4.4.21-9-c-ii-37
description: >
Array.prototype.reduce - the global object can be used as
accumulator
-includes: [fnGlobalObject.js]
---*/
+var global = this;
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
accessed = true;
- return prevVal === fnGlobalObject();
+ return prevVal === global;
}
var obj = { 0: 11, length: 1 };
-assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, fnGlobalObject()), true, 'Array.prototype.reduce.call(obj, callbackfn, fnGlobalObject())');
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, this), true, 'Array.prototype.reduce.call(obj, callbackfn, this)');
assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-15.js
index 78a7ee7e9..1bf0a1311 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-15.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-15.js
@@ -6,21 +6,21 @@ es5id: 15.4.4.22-2-15
description: >
Array.prototype.reduceRight - 'length' is property of the global
object
-includes: [fnGlobalObject.js]
---*/
+var global = this;
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
accessed = true;
- return obj.length === fnGlobalObject().length;
+ return obj.length === global.length;
}
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = 12;
- fnGlobalObject()[1] = 11;
- fnGlobalObject()[2] = 9;
- fnGlobalObject().length = 2;
+ var oldLen = this.length;
+ this[0] = 12;
+ this[1] = 11;
+ this[2] = 9;
+ this.length = 2;
-assert(Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn, 111), 'Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn, 111) !== true');
+assert(Array.prototype.reduceRight.call(this, callbackfn, 111), 'Array.prototype.reduceRight.call(this, callbackfn, 111) !== true');
assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-23.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-23.js
index bbe19f73d..9d376d448 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-23.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-23.js
@@ -6,7 +6,6 @@ es5id: 15.4.4.22-8-b-iii-1-23
description: >
Array.prototype.reduceRight - This object is the global object
which contains index property
-includes: [fnGlobalObject.js]
---*/
var testResult = false;
@@ -16,12 +15,12 @@ includes: [fnGlobalObject.js]
}
}
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = 0;
- fnGlobalObject()[1] = 1;
- fnGlobalObject()[2] = 2;
- fnGlobalObject().length = 3;
+ var oldLen = this.length;
+ this[0] = 0;
+ this[1] = 1;
+ this[2] = 2;
+ this.length = 3;
- Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn);
+ Array.prototype.reduceRight.call(this, callbackfn);
assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-23.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-23.js
index 854466ce7..672607842 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-23.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-23.js
@@ -6,7 +6,6 @@ es5id: 15.4.4.22-9-c-i-23
description: >
Array.prototype.reduceRight - This object is an global object
which contains index property
-includes: [fnGlobalObject.js]
---*/
var testResult = false;
@@ -16,12 +15,12 @@ includes: [fnGlobalObject.js]
}
}
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = 0;
- fnGlobalObject()[1] = 1;
- fnGlobalObject()[2] = 2;
- fnGlobalObject().length = 3;
+ var oldLen = this.length;
+ this[0] = 0;
+ this[1] = 1;
+ this[2] = 2;
+ this.length = 3;
- Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn, "initialValue");
+ Array.prototype.reduceRight.call(this, callbackfn, "initialValue");
assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-37.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-37.js
index 6eecc246b..d932c446b 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-37.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-37.js
@@ -6,16 +6,16 @@ es5id: 15.4.4.22-9-c-ii-37
description: >
Array.prototype.reduceRight - the global object can be used as
accumulator
-includes: [fnGlobalObject.js]
---*/
+var global = this;
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
accessed = true;
- return prevVal === fnGlobalObject();
+ return prevVal === global;
}
var obj = { 0: 11, length: 1 };
-assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, fnGlobalObject()), true, 'Array.prototype.reduceRight.call(obj, callbackfn, fnGlobalObject())');
+assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, this), true, 'Array.prototype.reduceRight.call(obj, callbackfn, this)');
assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-15.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-15.js
index ea05feca4..f4fbdf646 100644
--- a/test/built-ins/Array/prototype/some/15.4.4.17-2-15.js
+++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-15.js
@@ -4,7 +4,6 @@
/*---
es5id: 15.4.4.17-2-15
description: Array.prototype.some - 'length' is property of the global object
-includes: [fnGlobalObject.js]
---*/
function callbackfn1(val, idx, obj) {
@@ -15,11 +14,11 @@ includes: [fnGlobalObject.js]
return val > 11;
}
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = 9;
- fnGlobalObject()[1] = 11;
- fnGlobalObject()[2] = 12;
- fnGlobalObject().length = 2;
+ var oldLen = this.length;
+ this[0] = 9;
+ this[1] = 11;
+ this[2] = 12;
+ this.length = 2;
-assert(Array.prototype.some.call(fnGlobalObject(), callbackfn1), 'Array.prototype.some.call(fnGlobalObject(), callbackfn1) !== true');
-assert.sameValue(Array.prototype.some.call(fnGlobalObject(), callbackfn2), false, 'Array.prototype.some.call(fnGlobalObject(), callbackfn2)');
+assert(Array.prototype.some.call(this, callbackfn1), 'Array.prototype.some.call(this, callbackfn1) !== true');
+assert.sameValue(Array.prototype.some.call(this, callbackfn2), false, 'Array.prototype.some.call(this, callbackfn2)');
diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-21.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-21.js
index c6bda3120..1e88de56c 100644
--- a/test/built-ins/Array/prototype/some/15.4.4.17-5-21.js
+++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-21.js
@@ -4,11 +4,11 @@
/*---
es5id: 15.4.4.17-5-21
description: Array.prototype.some - the global object can be used as thisArg
-includes: [fnGlobalObject.js]
---*/
+var global = this;
function callbackfn(val, idx, obj) {
- return this === fnGlobalObject();
+ return this === global;
}
-assert([11].some(callbackfn, fnGlobalObject()), '[11].some(callbackfn, fnGlobalObject()) !== true');
+assert([11].some(callbackfn, this), '[11].some(callbackfn, global) !== true');
diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-23.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-23.js
index 4c4ec2ab5..1332401f9 100644
--- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-23.js
+++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-23.js
@@ -6,7 +6,6 @@ es5id: 15.4.4.17-7-c-i-23
description: >
Array.prototype.some - This object is an global object which
contains index property
-includes: [fnGlobalObject.js]
---*/
function callbackfn(val, idx, obj) {
@@ -16,8 +15,8 @@ includes: [fnGlobalObject.js]
return false;
}
- var oldLen = fnGlobalObject().length;
- fnGlobalObject()[0] = 11;
- fnGlobalObject().length = 1;
+ var oldLen = this.length;
+ this[0] = 11;
+ this.length = 1;
-assert(Array.prototype.some.call(fnGlobalObject(), callbackfn), 'Array.prototype.some.call(fnGlobalObject(), callbackfn) !== true');
+assert(Array.prototype.some.call(this, callbackfn), 'Array.prototype.some.call(this, callbackfn) !== true');
diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-26.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-26.js
index 7f03efbbb..44f8298cc 100644
--- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-26.js
+++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-26.js
@@ -6,11 +6,11 @@ es5id: 15.4.4.17-7-c-iii-26
description: >
Array.prototype.some - return value of callbackfn is the global
object
-includes: [fnGlobalObject.js]
---*/
+var global = this;
function callbackfn(val, idx, obj) {
- return fnGlobalObject();
+ return global;
}
assert([11].some(callbackfn), '[11].some(callbackfn) !== true');
diff --git a/test/built-ins/Function/15.3.5.4_2-64gs.js b/test/built-ins/Function/15.3.5.4_2-64gs.js
index 4120f086f..a95d82a41 100644
--- a/test/built-ins/Function/15.3.5.4_2-64gs.js
+++ b/test/built-ins/Function/15.3.5.4_2-64gs.js
@@ -8,13 +8,13 @@ description: >
non-strict function (strict function declaration called by
Function.prototype.apply(globalObject))
flags: [noStrict]
-includes: [fnGlobalObject.js]
---*/
+var global = this;
function f() { "use strict"; gNonStrict();};
assert.throws(TypeError, function() {
- f.apply(fnGlobalObject());
+ f.apply(global);
});
function gNonStrict() {
diff --git a/test/built-ins/Function/15.3.5.4_2-69gs.js b/test/built-ins/Function/15.3.5.4_2-69gs.js
index 537af2945..0572d8603 100644
--- a/test/built-ins/Function/15.3.5.4_2-69gs.js
+++ b/test/built-ins/Function/15.3.5.4_2-69gs.js
@@ -8,13 +8,13 @@ description: >
non-strict function (strict function declaration called by
Function.prototype.call(globalObject))
flags: [noStrict]
-includes: [fnGlobalObject.js]
---*/
+var global = this;
function f() { "use strict"; gNonStrict();};
assert.throws(TypeError, function() {
- f.call(fnGlobalObject());
+ f.call(this);
});
function gNonStrict() {
diff --git a/test/built-ins/Function/15.3.5.4_2-74gs.js b/test/built-ins/Function/15.3.5.4_2-74gs.js
index 3256040c7..e1c730c23 100644
--- a/test/built-ins/Function/15.3.5.4_2-74gs.js
+++ b/test/built-ins/Function/15.3.5.4_2-74gs.js
@@ -8,13 +8,13 @@ description: >
non-strict function (strict function declaration called by
Function.prototype.bind(globalObject)())
flags: [noStrict]
-includes: [fnGlobalObject.js]
---*/
+var global = this;
function f() { "use strict"; gNonStrict();};
assert.throws(TypeError, function() {
- f.bind(fnGlobalObject())();
+ f.bind(global)();
});
function gNonStrict() {
diff --git a/test/built-ins/Function/15.3.5.4_2-83gs.js b/test/built-ins/Function/15.3.5.4_2-83gs.js
index 99d68c861..940e7d7e4 100644
--- a/test/built-ins/Function/15.3.5.4_2-83gs.js
+++ b/test/built-ins/Function/15.3.5.4_2-83gs.js
@@ -9,11 +9,11 @@ description: >
strict Function.prototype.apply(globalObject))
flags: [noStrict]
features: [caller]
-includes: [fnGlobalObject.js]
---*/
+var global = this;
function f() { return gNonStrict();};
-(function () {"use strict"; f.apply(fnGlobalObject()); })();
+(function () {"use strict"; f.apply(global); })();
function gNonStrict() {
diff --git a/test/built-ins/Function/15.3.5.4_2-88gs.js b/test/built-ins/Function/15.3.5.4_2-88gs.js
index f2506fd4f..7d1b0825c 100644
--- a/test/built-ins/Function/15.3.5.4_2-88gs.js
+++ b/test/built-ins/Function/15.3.5.4_2-88gs.js
@@ -9,11 +9,11 @@ description: >
strict Function.prototype.call(globalObject))
flags: [noStrict]
features: [caller]
-includes: [fnGlobalObject.js]
---*/
+var global = this;
function f() { return gNonStrict();};
-(function () {"use strict"; f.call(fnGlobalObject()); })();
+(function () {"use strict"; f.call(global); })();
function gNonStrict() {
diff --git a/test/built-ins/Function/15.3.5.4_2-93gs.js b/test/built-ins/Function/15.3.5.4_2-93gs.js
index 78d9e7039..bad743269 100644
--- a/test/built-ins/Function/15.3.5.4_2-93gs.js
+++ b/test/built-ins/Function/15.3.5.4_2-93gs.js
@@ -9,11 +9,11 @@ description: >
strict Function.prototype.bind(globalObject)())
flags: [noStrict]
features: [caller]
-includes: [fnGlobalObject.js]
---*/
+var global = this;
function f() { return gNonStrict();};
-(function () {"use strict"; f.bind(fnGlobalObject())(); })();
+(function () {"use strict"; f.bind(global)(); })();
function gNonStrict() {
diff --git a/test/built-ins/Infinity/15.1.1.2-0.js b/test/built-ins/Infinity/15.1.1.2-0.js
index 40ace7cd7..a2e63985e 100644
--- a/test/built-ins/Infinity/15.1.1.2-0.js
+++ b/test/built-ins/Infinity/15.1.1.2-0.js
@@ -6,10 +6,9 @@ es5id: 15.1.1.2-0
description: >
Global.Infinity is a data property with default attribute values
(false)
-includes: [fnGlobalObject.js]
---*/
- var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), 'Infinity');
+ var desc = Object.getOwnPropertyDescriptor(this, 'Infinity');
assert.sameValue(desc.writable, false, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
diff --git a/test/built-ins/Infinity/S15.1.1.2_A2_T1.js b/test/built-ins/Infinity/S15.1.1.2_A2_T1.js
index c0b90e598..0a6435466 100755
--- a/test/built-ins/Infinity/S15.1.1.2_A2_T1.js
+++ b/test/built-ins/Infinity/S15.1.1.2_A2_T1.js
@@ -5,11 +5,11 @@
info: The Infinity is ReadOnly
es5id: 15.1.1.2_A2_T1
description: Checking typeof Functions
-includes: [propertyHelper.js, fnGlobalObject.js]
+includes: [propertyHelper.js]
---*/
// CHECK#1
-verifyNotWritable(fnGlobalObject(), "Infinity", null, true);
+verifyNotWritable(this, "Infinity", null, true);
if (typeof(Infinity) === "boolean") {
$ERROR('#1: Infinity = true; typeof(Infinity) !== "boolean". Actual: ' + (typeof(Infinity)));
}
diff --git a/test/built-ins/Infinity/S15.1.1.2_A3_T1.js b/test/built-ins/Infinity/S15.1.1.2_A3_T1.js
index 6c8d877a8..267482544 100644
--- a/test/built-ins/Infinity/S15.1.1.2_A3_T1.js
+++ b/test/built-ins/Infinity/S15.1.1.2_A3_T1.js
@@ -5,14 +5,14 @@
info: The Infinity is DontDelete
es5id: 15.1.1.2_A3_T1
description: Use delete
-includes: [propertyHelper.js, fnGlobalObject.js]
+includes: [propertyHelper.js]
---*/
// CHECK#1
-verifyNotConfigurable(fnGlobalObject(), "Infinity");
+verifyNotConfigurable(this, "Infinity");
try {
- if (delete fnGlobalObject().Infinity !== false) {
+ if (delete this.Infinity !== false) {
$ERROR('#1: delete Infinity === false.');
}
} catch (e) {
diff --git a/test/built-ins/NaN/15.1.1.1-0.js b/test/built-ins/NaN/15.1.1.1-0.js
index 48d3e9dd9..c8638ede8 100644
--- a/test/built-ins/NaN/15.1.1.1-0.js
+++ b/test/built-ins/NaN/15.1.1.1-0.js
@@ -4,10 +4,9 @@
/*---
es5id: 15.1.1.1-0
description: Global.NaN is a data property with default attribute values (false)
-includes: [fnGlobalObject.js]
---*/
- var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), 'NaN');
+ var desc = Object.getOwnPropertyDescriptor(this, 'NaN');
assert.sameValue(desc.writable, false, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
diff --git a/test/built-ins/NaN/S15.1.1.1_A2_T1.js b/test/built-ins/NaN/S15.1.1.1_A2_T1.js
index 89fd2b8ed..2ed88aa61 100755
--- a/test/built-ins/NaN/S15.1.1.1_A2_T1.js
+++ b/test/built-ins/NaN/S15.1.1.1_A2_T1.js
@@ -5,11 +5,11 @@
info: The NaN is ReadOnly
es5id: 15.1.1.1_A2_T1
description: Checking typeof Functions
-includes: [propertyHelper.js, fnGlobalObject.js]
+includes: [propertyHelper.js]
---*/
// CHECK#1
-verifyNotWritable(fnGlobalObject(), "NaN", null, true);
+verifyNotWritable(this, "NaN", null, true);
if (typeof(NaN) === "boolean") {
$ERROR('#1: NaN = true; typeof(NaN) !== "boolean". Actual: ' + (typeof(NaN)));
}
diff --git a/test/built-ins/NaN/S15.1.1.1_A3_T1.js b/test/built-ins/NaN/S15.1.1.1_A3_T1.js
index 8be213357..fba6441c9 100644
--- a/test/built-ins/NaN/S15.1.1.1_A3_T1.js
+++ b/test/built-ins/NaN/S15.1.1.1_A3_T1.js
@@ -5,14 +5,14 @@
info: The NaN is DontDelete
es5id: 15.1.1.2_A3_T1
description: Use delete
-includes: [propertyHelper.js, fnGlobalObject.js]
+includes: [propertyHelper.js]
---*/
// CHECK#1
-verifyNotConfigurable(fnGlobalObject(), "NaN");
+verifyNotConfigurable(this, "NaN");
try {
- if (delete fnGlobalObject().NaN !== false) {
+ if (delete this.NaN !== false) {
$ERROR('#1: delete NaN === false.');
}
} catch (e) {
diff --git a/test/built-ins/Object/create/15.2.3.5-4-124.js b/test/built-ins/Object/create/15.2.3.5-4-124.js
index d22aee94f..664fdd276 100644
--- a/test/built-ins/Object/create/15.2.3.5-4-124.js
+++ b/test/built-ins/Object/create/15.2.3.5-4-124.js
@@ -7,13 +7,12 @@ description: >
Object.create - one property in 'Properties' is the global object
that uses Object's [[Get]] method to access the 'configurable'
property (8.10.5 step 4.a)
-includes: [fnGlobalObject.js]
---*/
- fnGlobalObject().configurable = true;
+ this.configurable = true;
var newObj = Object.create({}, {
- prop: fnGlobalObject()
+ prop: this
});
var result1 = newObj.hasOwnProperty("prop");
diff --git a/test/built-ins/Object/create/15.2.3.5-4-149.js b/test/built-ins/Object/create/15.2.3.5-4-149.js
index 9b590ff55..d5b9cd927 100644
--- a/test/built-ins/Object/create/15.2.3.5-4-149.js
+++ b/test/built-ins/Object/create/15.2.3.5-4-149.js
@@ -6,12 +6,11 @@ es5id: 15.2.3.5-4-149
description: >
Object.create - 'configurable' property of one property in
'Properties' is the global object (8.10.5 step 4.b)
-includes: [fnGlobalObject.js]
---*/
var newObj = Object.create({}, {
prop: {
- configurable: fnGlobalObject()
+ configurable: this
}
});
diff --git a/test/built-ins/Object/create/15.2.3.5-4-177.js b/test/built-ins/Object/create/15.2.3.5-4-177.js
index d9e835efb..58825c2a8 100644
--- a/test/built-ins/Object/create/15.2.3.5-4-177.js
+++ b/test/built-ins/Object/create/15.2.3.5-4-177.js
@@ -7,13 +7,12 @@ description: >
Object.create - one property in 'Properties' is the global object
that uses Object's [[Get]] method to access the 'value' property
(8.10.5 step 5.a)
-includes: [fnGlobalObject.js]
---*/
- fnGlobalObject().value = "GlobalValue";
+ this.value = "GlobalValue";
var newObj = Object.create({}, {
- prop: fnGlobalObject()
+ prop: this
});
assert.sameValue(newObj.prop, "GlobalValue", 'newObj.prop');
diff --git a/test/built-ins/Object/create/15.2.3.5-4-203.js b/test/built-ins/Object/create/15.2.3.5-4-203.js
index 013ecb214..2dd103625 100644
--- a/test/built-ins/Object/create/15.2.3.5-4-203.js
+++ b/test/built-ins/Object/create/15.2.3.5-4-203.js
@@ -7,13 +7,12 @@ description: >
Object.create - one property in 'Properties' is the global object
that uses Object's [[Get]] method to access the 'writable'
property (8.10.5 step 6.a)
-includes: [fnGlobalObject.js]
---*/
- fnGlobalObject().writable = true;
+ this.writable = true;
var newObj = Object.create({}, {
- prop: fnGlobalObject()
+ prop: this
});
var beforeWrite = (newObj.hasOwnProperty("prop") && typeof (newObj.prop) === "undefined");
diff --git a/test/built-ins/Object/create/15.2.3.5-4-228.js b/test/built-ins/Object/create/15.2.3.5-4-228.js
index 7adb830f1..6b8ffee24 100644
--- a/test/built-ins/Object/create/15.2.3.5-4-228.js
+++ b/test/built-ins/Object/create/15.2.3.5-4-228.js
@@ -6,12 +6,11 @@ es5id: 15.2.3.5-4-228
description: >
Object.create - 'writable' property of one property in
'Properties' is the global object (8.10.5 step 6.b)
-includes: [fnGlobalObject.js]
---*/
var newObj = Object.create({}, {
prop: {
- writable: fnGlobalObject()
+ writable: this
}
});
var hasProperty = newObj.hasOwnProperty("prop");
diff --git a/test/built-ins/Object/create/15.2.3.5-4-256.js b/test/built-ins/Object/create/15.2.3.5-4-256.js
index 6f35538fe..1fb8acfc8 100644
--- a/test/built-ins/Object/create/15.2.3.5-4-256.js
+++ b/test/built-ins/Object/create/15.2.3.5-4-256.js
@@ -7,15 +7,14 @@ description: >
Object.create - one property in 'Properties' is the global object
that uses Object's [[Get]] method to access the 'get' property
(8.10.5 step 7.a)
-includes: [fnGlobalObject.js]
---*/
- fnGlobalObject().get = function () {
+ this.get = function () {
return "VerifyGlobalObject";
};
var newObj = Object.create({}, {
- prop: fnGlobalObject()
+ prop: this
});
assert.sameValue(newObj.prop, "VerifyGlobalObject", 'newObj.prop');
diff --git a/test/built-ins/Object/create/15.2.3.5-4-291.js b/test/built-ins/Object/create/15.2.3.5-4-291.js
index b5d8d69e6..b412aa9d0 100644
--- a/test/built-ins/Object/create/15.2.3.5-4-291.js
+++ b/test/built-ins/Object/create/15.2.3.5-4-291.js
@@ -7,17 +7,16 @@ description: >
Object.create - one property in 'Properties' is the global object
that uses Object's [[Get]] method to access the 'set' property
(8.10.5 step 8.a)
-includes: [fnGlobalObject.js]
---*/
var data = "data";
- fnGlobalObject().set = function (value) {
+ this.set = function (value) {
data = value;
};
var newObj = Object.create({}, {
- prop: fnGlobalObject()
+ prop: this
});
var hasProperty = newObj.hasOwnProperty("prop");
diff --git a/test/built-ins/Object/create/15.2.3.5-4-300.js b/test/built-ins/Object/create/15.2.3.5-4-300.js
index d9557fc3d..4e350f9e7 100644
--- a/test/built-ins/Object/create/15.2.3.5-4-300.js
+++ b/test/built-ins/Object/create/15.2.3.5-4-300.js
@@ -6,14 +6,14 @@ es5id: 15.2.3.5-4-300
description: >
Object.create - 'set' property of one property in 'Properties' is
a host object that isn't callable (8.10.5 step 8.b)
-includes: [fnGlobalObject.js]
---*/
+var global = this;
assert.throws(TypeError, function() {
Object.create({}, {
prop: {
- set: fnGlobalObject()
+ set: global
}
});
});
diff --git a/test/built-ins/Object/create/15.2.3.5-4-71.js b/test/built-ins/Object/create/15.2.3.5-4-71.js
index 9d7dc1fcc..2d6ecb8dd 100644
--- a/test/built-ins/Object/create/15.2.3.5-4-71.js
+++ b/test/built-ins/Object/create/15.2.3.5-4-71.js
@@ -7,15 +7,14 @@ description: >
Object.create - one property in 'Properties' is the global object
that uses Object's [[Get]] method to access the 'enumerable'
property (8.10.5 step 3.a)
-includes: [fnGlobalObject.js]
---*/
var accessed = false;
- fnGlobalObject().enumerable = true;
+ this.enumerable = true;
var newObj = Object.create({}, {
- prop: fnGlobalObject()
+ prop: this
});
for (var property in newObj) {
if (property === "prop") {
diff --git a/test/built-ins/Object/create/15.2.3.5-4-96.js b/test/built-ins/Object/create/15.2.3.5-4-96.js
index c380a4bc2..8250c6f28 100644
--- a/test/built-ins/Object/create/15.2.3.5-4-96.js
+++ b/test/built-ins/Object/create/15.2.3.5-4-96.js
@@ -6,14 +6,13 @@ es5id: 15.2.3.5-4-96
description: >
Object.create - 'enumerable' property of one property in
'Properties' is the global object (8.10.5 step 3.b)
-includes: [fnGlobalObject.js]
---*/
var accessed = false;
var newObj = Object.create({}, {
prop: {
- enumerable: fnGlobalObject()
+ enumerable: this
}
});
for (var property in newObj) {
diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-2-18.js b/test/built-ins/Object/defineProperties/15.2.3.7-2-18.js
index 54d63f93e..e36e3f666 100644
--- a/test/built-ins/Object/defineProperties/15.2.3.7-2-18.js
+++ b/test/built-ins/Object/defineProperties/15.2.3.7-2-18.js
@@ -6,28 +6,28 @@ es5id: 15.2.3.7-2-18
description: >
Object.defineProperties - argument 'Properties' is the global
object
-includes: [fnGlobalObject.js]
---*/
+var global = this;
var obj = {};
var result = false;
try {
- Object.defineProperty(fnGlobalObject(), "prop", {
+ Object.defineProperty(this, "prop", {
get: function () {
- result = (this === fnGlobalObject());
+ result = (this === global);
return {};
},
enumerable: true,
configurable:true
});
- Object.defineProperties(obj, fnGlobalObject());
+ Object.defineProperties(obj, this);
} catch (e) {
if (!(e instanceof TypeError)) throw e;
result = true;
} finally {
- delete fnGlobalObject().prop;
+ delete this.prop;
}
assert(result, 'result !== true');
diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-5-b-109.js b/test/built-ins/Object/defineProperties/15.2.3.7-5-b-109.js
index dbeba830e..4a99de902 100644
--- a/test/built-ins/Object/defineProperties/15.2.3.7-5-b-109.js
+++ b/test/built-ins/Object/defineProperties/15.2.3.7-5-b-109.js
@@ -6,14 +6,13 @@ es5id: 15.2.3.7-5-b-109
description: >
Object.defineProperties - value of 'configurable' property of
'descObj' is the global object (8.10.5 step 4.b)
-includes: [fnGlobalObject.js]
---*/
var obj = {};
Object.defineProperties(obj, {
property: {
- configurable: fnGlobalObject()
+ configurable: this
}
});
var preCheck = obj.hasOwnProperty("property");
diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-5-b-137.js b/test/built-ins/Object/defineProperties/15.2.3.7-5-b-137.js
index 00afd773f..db7177f09 100644
--- a/test/built-ins/Object/defineProperties/15.2.3.7-5-b-137.js
+++ b/test/built-ins/Object/defineProperties/15.2.3.7-5-b-137.js
@@ -7,15 +7,14 @@ description: >
Object.defineProperties - 'descObj' is the global object which
implements its own [[Get]] method to get 'value' property (8.10.5
step 5.a)
-includes: [fnGlobalObject.js]
---*/
var obj = {};
- fnGlobalObject().value = "global";
+ this.value = "global";
Object.defineProperties(obj, {
- property: fnGlobalObject()
+ property: this
});
assert.sameValue(obj.property, "global", 'obj.property');
diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-5-b-163.js b/test/built-ins/Object/defineProperties/15.2.3.7-5-b-163.js
index c508455ca..0cf594b05 100644
--- a/test/built-ins/Object/defineProperties/15.2.3.7-5-b-163.js
+++ b/test/built-ins/Object/defineProperties/15.2.3.7-5-b-163.js
@@ -7,18 +7,16 @@ description: >
Object.defineProperties - 'descObj' is the global object which
implements its own [[Get]] method to get 'writable' property
(8.10.5 step 6.a)
-includes:
- - propertyHelper.js
- - fnGlobalObject.js
+includes: [propertyHelper.js]
---*/
var obj = {};
- fnGlobalObject().writable = false;
+ this.writable = false;
Object.defineProperties(obj, {
- property: fnGlobalObject()
+ property: this
});
assert(obj.hasOwnProperty("property"));
diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-5-b-188.js b/test/built-ins/Object/defineProperties/15.2.3.7-5-b-188.js
index d58c5a2c5..93da155d8 100644
--- a/test/built-ins/Object/defineProperties/15.2.3.7-5-b-188.js
+++ b/test/built-ins/Object/defineProperties/15.2.3.7-5-b-188.js
@@ -6,14 +6,13 @@ es5id: 15.2.3.7-5-b-188
description: >
Object.defineProperties - value of 'writable' property of
'descObj' is the global object (8.10.5 step 6.b)
-includes: [fnGlobalObject.js]
---*/
var obj = {};
Object.defineProperties(obj, {
property: {
- writable: fnGlobalObject()
+ writable: this
}
});
diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-5-b-216.js b/test/built-ins/Object/defineProperties/15.2.3.7-5-b-216.js
index c68a95226..26f4eeb5b 100644
--- a/test/built-ins/Object/defineProperties/15.2.3.7-5-b-216.js
+++ b/test/built-ins/Object/defineProperties/15.2.3.7-5-b-216.js
@@ -7,17 +7,16 @@ description: >
Object.defineProperties - 'descObj' is the global object which
implements its own [[Get]] method to get 'get' property (8.10.5
step 7.a)
-includes: [fnGlobalObject.js]
---*/
var obj = {};
- fnGlobalObject().get = function () {
+ this.get = function () {
return "global";
};
Object.defineProperties(obj, {
- property: fnGlobalObject()
+ property: this
});
assert.sameValue(obj.property, "global", 'obj.property');
diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-5-b-31.js b/test/built-ins/Object/defineProperties/15.2.3.7-5-b-31.js
index 7c1a48bc1..6fa274f40 100644
--- a/test/built-ins/Object/defineProperties/15.2.3.7-5-b-31.js
+++ b/test/built-ins/Object/defineProperties/15.2.3.7-5-b-31.js
@@ -7,16 +7,15 @@ description: >
Object.defineProperties - 'descObj' is the global object which
implements its own [[Get]] method to get 'enumerable' property
(8.10.5 step 3.a)
-includes: [fnGlobalObject.js]
---*/
var obj = {};
var accessed = false;
- fnGlobalObject().enumerable = true;
+ this.enumerable = true;
Object.defineProperties(obj, {
- prop: fnGlobalObject()
+ prop: this
});
for (var property in obj) {
if (property === "prop") {
diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-5-b-56.js b/test/built-ins/Object/defineProperties/15.2.3.7-5-b-56.js
index 06b5f3eee..aae77824a 100644
--- a/test/built-ins/Object/defineProperties/15.2.3.7-5-b-56.js
+++ b/test/built-ins/Object/defineProperties/15.2.3.7-5-b-56.js
@@ -6,7 +6,6 @@ es5id: 15.2.3.7-5-b-56
description: >
Object.defineProperties - value of 'enumerable' property of
'descObj' is the global object (8.10.5 step 3.b)
-includes: [fnGlobalObject.js]
---*/
var obj = {};
@@ -14,7 +13,7 @@ includes: [fnGlobalObject.js]
Object.defineProperties(obj, {
prop: {
- enumerable: fnGlobalObject()
+ enumerable: this
}
});
for (var property in obj) {
diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-5-b-84.js b/test/built-ins/Object/defineProperties/15.2.3.7-5-b-84.js
index e0babbe9d..a662240fe 100644
--- a/test/built-ins/Object/defineProperties/15.2.3.7-5-b-84.js
+++ b/test/built-ins/Object/defineProperties/15.2.3.7-5-b-84.js
@@ -7,15 +7,14 @@ description: >
Object.defineProperties - 'descObj' is the global object which
implements its own [[Get]] method to get 'configurable' property
(8.10.5 step 4.a)
-includes: [fnGlobalObject.js]
---*/
var obj = {};
- fnGlobalObject().configurable = true;
+ this.configurable = true;
Object.defineProperties(obj, {
- prop: fnGlobalObject()
+ prop: this
});
var result1 = obj.hasOwnProperty("prop");
diff --git a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-24.js b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-24.js
index 1bba07061..1bf7cfbe7 100644
--- a/test/built-ins/Object/defineProperties/15.2.3.7-6-a-24.js
+++ b/test/built-ins/Object/defineProperties/15.2.3.7-6-a-24.js
@@ -7,29 +7,29 @@ description: >
Object.defineProperties - 'O' is the global object which
implements its own [[GetOwnProperty]] method to get 'P' (8.12.9
step 1 )
-includes: [propertyHelper.js, fnGlobalObject.js]
+includes: [propertyHelper.js]
---*/
-Object.defineProperty(fnGlobalObject(), "prop", {
+Object.defineProperty(this, "prop", {
value: 11,
writable: true,
enumerable: true,
configurable: true
});
-Object.defineProperties(fnGlobalObject(), {
+Object.defineProperties(this, {
prop: {
value: 12
}
});
-verifyEqualTo(fnGlobalObject(), "prop", 12);
+verifyEqualTo(this, "prop", 12);
-verifyWritable(fnGlobalObject(), "prop");
+verifyWritable(this, "prop");
-verifyEnumerable(fnGlobalObject(), "prop");
+verifyEnumerable(this, "prop");
-verifyConfigurable(fnGlobalObject(), "prop");
+verifyConfigurable(this, "prop");
-delete fnGlobalObject().prop;
+delete this.prop;
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-3-123.js b/test/built-ins/Object/defineProperty/15.2.3.6-3-123.js
index bbe94b75a..b89b54fc3 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-3-123.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-3-123.js
@@ -6,13 +6,12 @@ es5id: 15.2.3.6-3-123
description: >
Object.defineProperty - 'configurable' property in 'Attributes' is
the global object (8.10.5 step 4.b)
-includes: [fnGlobalObject.js]
---*/
var obj = {};
var attr = {
- configurable: fnGlobalObject()
+ configurable: this
};
Object.defineProperty(obj, "property", attr);
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-3-151.js b/test/built-ins/Object/defineProperty/15.2.3.6-3-151.js
index 13f2ce89d..afa1640a3 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-3-151.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-3-151.js
@@ -7,13 +7,12 @@ description: >
Object.defineProperty - 'Attributes' is the global object that
uses Object's [[Get]] method to access the 'value' property
(8.10.5 step 5.a)
-includes: [fnGlobalObject.js]
---*/
var obj = {};
- fnGlobalObject().value = "global";
+ this.value = "global";
- Object.defineProperty(obj, "property", fnGlobalObject());
+ Object.defineProperty(obj, "property", this);
assert.sameValue(obj.property, "global", 'obj.property');
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-3-177.js b/test/built-ins/Object/defineProperty/15.2.3.6-3-177.js
index dc5a0e6dd..c044f4dd9 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-3-177.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-3-177.js
@@ -7,14 +7,13 @@ description: >
Object.defineProperty - 'Attributes' is the global object that
uses Object's [[Get]] method to access the 'writable' property
(8.10.5 step 6.a)
-includes: [fnGlobalObject.js]
---*/
var obj = {};
- fnGlobalObject().writable = true;
+ this.writable = true;
- Object.defineProperty(obj, "property", fnGlobalObject());
+ Object.defineProperty(obj, "property", this);
var beforeWrite = obj.hasOwnProperty("property");
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-3-202.js b/test/built-ins/Object/defineProperty/15.2.3.6-3-202.js
index 1a92e780e..52ee4bbd6 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-3-202.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-3-202.js
@@ -6,13 +6,12 @@ es5id: 15.2.3.6-3-202
description: >
Object.defineProperty - 'writable' property in 'Attributes' is the
global object (8.10.5 step 6.b)
-includes: [fnGlobalObject.js]
---*/
var obj = {};
Object.defineProperty(obj, "property", {
- writable: fnGlobalObject()
+ writable: this
});
var beforeWrite = obj.hasOwnProperty("property");
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-3-230.js b/test/built-ins/Object/defineProperty/15.2.3.6-3-230.js
index a7dbfae0a..2a894faeb 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-3-230.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-3-230.js
@@ -7,15 +7,14 @@ description: >
Object.defineProperty - 'Attributes' is the global object that
uses Object's [[Get]] method to access the 'get' property (8.10.5
step 7.a)
-includes: [fnGlobalObject.js]
---*/
var obj = {};
- fnGlobalObject().get = function () {
+ this.get = function () {
return "globalGetProperty";
};
- Object.defineProperty(obj, "property", fnGlobalObject());
+ Object.defineProperty(obj, "property", this);
assert.sameValue(obj.property, "globalGetProperty", 'obj.property');
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-3-260.js b/test/built-ins/Object/defineProperty/15.2.3.6-3-260.js
index ce66181c2..17a785f86 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-3-260.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-3-260.js
@@ -7,17 +7,16 @@ description: >
Object.defineProperty - 'Attributes' is the global object that
uses Object's [[Get]] method to access the 'set' property (8.10.5
step 8.a)
-includes: [fnGlobalObject.js]
---*/
var obj = {};
var data = "data";
- fnGlobalObject().set = function (value) {
+ this.set = function (value) {
data = value;
};
- Object.defineProperty(obj, "property", fnGlobalObject());
+ Object.defineProperty(obj, "property", this);
obj.property = "overrideData";
assert(obj.hasOwnProperty("property"), 'obj.hasOwnProperty("property") !== true');
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-3-45.js b/test/built-ins/Object/defineProperty/15.2.3.6-3-45.js
index 114fcde60..98538314a 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-3-45.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-3-45.js
@@ -7,15 +7,14 @@ description: >
Object.defineProperty - 'Attributes' is the global object that
uses Object's [[Get]] method to access the 'enumerable' property
(8.10.5 step 3.a)
-includes: [fnGlobalObject.js]
---*/
var obj = {};
var accessed = false;
- fnGlobalObject().enumerable = true;
+ this.enumerable = true;
- Object.defineProperty(obj, "property", fnGlobalObject());
+ Object.defineProperty(obj, "property", this);
for (var prop in obj) {
if (prop === "property") {
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-3-70.js b/test/built-ins/Object/defineProperty/15.2.3.6-3-70.js
index ba161b0f6..ded68d14c 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-3-70.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-3-70.js
@@ -6,13 +6,12 @@ es5id: 15.2.3.6-3-70
description: >
Object.defineProperty - value of 'enumerable' property in
'Attributes' is the global object (8.10.5 step 3.b)
-includes: [fnGlobalObject.js]
---*/
var obj = {};
var accessed = false;
- Object.defineProperty(obj, "property", { enumerable: fnGlobalObject() });
+ Object.defineProperty(obj, "property", { enumerable: this });
for (var prop in obj) {
if (prop === "property") {
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-3-98.js b/test/built-ins/Object/defineProperty/15.2.3.6-3-98.js
index 1bc8fe297..5480de3fa 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-3-98.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-3-98.js
@@ -7,14 +7,13 @@ description: >
Object.defineProperty - 'Attributes' is the global object that
uses Object's [[Get]] method to access the 'configurable' property
(8.10.5 step 4.a)
-includes: [fnGlobalObject.js]
---*/
var obj = {};
- fnGlobalObject().configurable = true;
+ this.configurable = true;
- Object.defineProperty(obj, "property", fnGlobalObject());
+ Object.defineProperty(obj, "property", this);
var beforeDeleted = obj.hasOwnProperty("property");
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-354-13.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-354-13.js
index e4ea55dc5..6386e7c40 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-4-354-13.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-354-13.js
@@ -8,11 +8,11 @@ description: >
property successfully when [[Configurable]] attribute is true and
[[Writable]] attribute is false, 'O' is the global object (8.12.9
- step Note)
-includes: [propertyHelper.js, fnGlobalObject.js]
+includes: [propertyHelper.js]
---*/
-var obj = fnGlobalObject();
+var obj = this;
try {
Object.defineProperty(obj, "0", {
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-354-2.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-354-2.js
index fc2713ea4..5ee6d41a8 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-4-354-2.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-354-2.js
@@ -8,7 +8,7 @@ description: >
property 'P' successfully when [[Configurable]] attribute is true
and [[Writable]] attribute is false, 'A' is an Array object
(8.12.9 step - Note)
-includes: [propertyHelper.js, fnGlobalObject.js]
+includes: [propertyHelper.js]
---*/
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-354-4.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-354-4.js
index 6b5927f4a..5f644bd4c 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-4-354-4.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-354-4.js
@@ -7,11 +7,11 @@ description: >
Object.defineProperty will update [[Value]] attribute successfully
when [[Configurable]] attribute is true and [[Writable]] attribute
is false, 'O' is the global object (8.12.9 - step Note)
-includes: [propertyHelper.js, fnGlobalObject.js]
+includes: [propertyHelper.js]
---*/
-var obj = fnGlobalObject();
+var obj = this;
try {
Object.defineProperty(obj, "property", {
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-354-8.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-354-8.js
index af11b7433..f71251025 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-4-354-8.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-354-8.js
@@ -7,12 +7,10 @@ description: >
ES5 Attributes - property 'P' with attributes [[Writable]]: false,
[[Enumerable]]: true, [[Configurable]]: true is non-writable using
simple assignment, 'O' is the global object
-includes:
- - propertyHelper.js
- - fnGlobalObject.js
+includes: [propertyHelper.js]
---*/
-var obj = fnGlobalObject();
+var obj = this;
Object.defineProperty(obj, "prop", {
value: 2010,
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-360-3.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-360-3.js
index b1cdb7890..92122a8cd 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-4-360-3.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-360-3.js
@@ -8,12 +8,10 @@ description: >
[[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true
to an accessor property, 'O' is the global object (8.12.9 - step
9.b.i)
-includes:
- - propertyHelper.js
- - fnGlobalObject.js
+includes: [propertyHelper.js]
---*/
-var obj = fnGlobalObject();
+var obj = this;
Object.defineProperty(obj, "prop", {
value: 2010,
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-360-7.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-360-7.js
index b6c0050b9..1011c7241 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-4-360-7.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-360-7.js
@@ -8,14 +8,14 @@ description: >
attributes are [[Writable]]: false, [[Enumerable]]: true,
[[Configurable]]: true to an accessor property, 'O' is the global
object (8.12.9 - step 9.b.i)
-includes: [propertyHelper.js, fnGlobalObject.js]
+includes: [propertyHelper.js]
---*/
function getFunc() {
return 20;
}
-var obj = fnGlobalObject();
+var obj = this;
try {
Object.defineProperty(obj, "0", {
value: 2010,
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-399.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-399.js
index 71b0a8e0a..0967e3d18 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-4-399.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-399.js
@@ -6,16 +6,15 @@ es5id: 15.2.3.6-4-399
description: >
ES5 Attributes - [[Value]] attribute of data property is the
global object
-includes: [fnGlobalObject.js]
---*/
var obj = {};
Object.defineProperty(obj, "prop", {
- value: fnGlobalObject()
+ value: this
});
var desc = Object.getOwnPropertyDescriptor(obj, "prop");
-assert.sameValue(obj.prop, fnGlobalObject(), 'obj.prop');
-assert.sameValue(desc.value, fnGlobalObject(), 'desc.value');
+assert.sameValue(obj.prop, this, 'obj.prop');
+assert.sameValue(desc.value, this, 'desc.value');
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-45.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-45.js
index 128c2e32f..8f846042f 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-4-45.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-45.js
@@ -7,18 +7,18 @@ description: >
Object.defineProperty - 'O' is the global object that uses
Object's [[GetOwnProperty]] method to access the 'name' property
(8.12.9 step 1)
-includes: [propertyHelper.js, fnGlobalObject.js]
+includes: [propertyHelper.js]
---*/
-Object.defineProperty(fnGlobalObject(), "foo", {
+Object.defineProperty(this, "foo", {
value: 12,
configurable: true
});
-verifyEqualTo(fnGlobalObject(), "foo", 12);
+verifyEqualTo(this, "foo", 12);
-verifyNotWritable(fnGlobalObject(), "foo");
+verifyNotWritable(this, "foo");
-verifyNotEnumerable(fnGlobalObject(), "foo");
+verifyNotEnumerable(this, "foo");
-verifyConfigurable(fnGlobalObject(), "foo");
+verifyConfigurable(this, "foo");
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-531-13.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-531-13.js
index 5b9a75899..e214345d1 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-4-531-13.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-531-13.js
@@ -8,11 +8,11 @@ description: >
of indexed accessor property 'P' successfully when
[[Configurable]] attribute is true, 'O' is the global object
(8.12.9 step 11)
-includes: [propertyHelper.js, fnGlobalObject.js]
+includes: [propertyHelper.js]
---*/
-var obj = fnGlobalObject();
+var obj = this;
try {
obj.verifySetFunction = "data";
Object.defineProperty(obj, "0", {
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-531-17.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-531-17.js
index 84b8696dc..e1e03c324 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-4-531-17.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-531-17.js
@@ -7,10 +7,9 @@ description: >
ES5 Attributes - Updating an indexed accessor property 'P' using
simple assignment is successful, 'O' is the global object (8.12.5
step 5.b)
-includes: [fnGlobalObject.js]
---*/
- var obj = fnGlobalObject();
+ var obj = this;
obj.verifySetFunc = "data";
var setFunc = function (value) {
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-531-4.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-531-4.js
index beb1f6b47..01f752db7 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-4-531-4.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-531-4.js
@@ -7,11 +7,11 @@ description: >
Object.defineProperty will update [[Get]] and [[Set]] attributes
of named accessor property 'P' successfully when [[Configurable]]
attribute is true, 'O' is the global object (8.12.9 step 11)
-includes: [propertyHelper.js, fnGlobalObject.js]
+includes: [propertyHelper.js]
---*/
-var obj = fnGlobalObject();
+var obj = this;
try {
obj.verifySetFunction = "data";
Object.defineProperty(obj, "property", {
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-531-8.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-531-8.js
index 610532c9c..52b30025f 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-4-531-8.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-531-8.js
@@ -7,12 +7,10 @@ description: >
ES5 Attributes - Updating a named accessor property 'P' without
[[Set]] using simple assignment is failed, 'O' is the global
object (8.12.5 step 5.b)
-includes:
- - propertyHelper.js
- - fnGlobalObject.js
+includes: [propertyHelper.js]
---*/
-var obj = fnGlobalObject();
+var obj = this;
obj.verifySetFunc = "data";
var getFunc = function () {
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-538-3.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-538-3.js
index 5b3943ca0..f974218d7 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-4-538-3.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-538-3.js
@@ -7,10 +7,10 @@ description: >
ES5 Attributes - Updating a named accessor property 'P' whose
[[Configurable]] attribute is true to a data property is
successful, 'O' is the global object
-includes: [propertyHelper.js, fnGlobalObject.js]
+includes: [propertyHelper.js]
---*/
-var obj = fnGlobalObject();
+var obj = this;
obj.verifySetFunc = "data";
var getFunc = function () {
diff --git a/test/built-ins/Object/defineProperty/15.2.3.6-4-538-7.js b/test/built-ins/Object/defineProperty/15.2.3.6-4-538-7.js
index 3e2c36f47..29b931fd2 100644
--- a/test/built-ins/Object/defineProperty/15.2.3.6-4-538-7.js
+++ b/test/built-ins/Object/defineProperty/15.2.3.6-4-538-7.js
@@ -7,10 +7,10 @@ description: >
ES5 Attributes - Updating an indexed accessor property 'P' whose
[[Configurable]] attribute is true to a data property is
successful, 'O' is the global object
-includes: [propertyHelper.js, fnGlobalObject.js]
+includes: [propertyHelper.js]
---*/
-var obj = fnGlobalObject();
+var obj = this;
obj.verifySetFunc = "data";
var getFunc = function () {
diff --git a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-10.js b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-10.js
index 58a828328..d82974ad9 100644
--- a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-10.js
+++ b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-10.js
@@ -6,10 +6,9 @@ es5id: 15.2.3.3-4-10
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Global.decodeURIComponent)
-includes: [fnGlobalObject.js]
---*/
- var global = fnGlobalObject();
+ var global = this;
var desc = Object.getOwnPropertyDescriptor(global, "decodeURIComponent");
assert.sameValue(desc.value, global.decodeURIComponent, 'desc.value');
diff --git a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-11.js b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-11.js
index 49f25de6d..18a41a127 100644
--- a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-11.js
+++ b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-11.js
@@ -6,10 +6,9 @@ es5id: 15.2.3.3-4-11
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Global.encodeURIComponent)
-includes: [fnGlobalObject.js]
---*/
- var global = fnGlobalObject();
+ var global = this;
var desc = Object.getOwnPropertyDescriptor(global, "encodeURIComponent");
assert.sameValue(desc.value, global.encodeURIComponent, 'desc.value');
diff --git a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-178.js b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-178.js
index 9b3668eca..7f5b4903d 100644
--- a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-178.js
+++ b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-178.js
@@ -6,11 +6,10 @@ es5id: 15.2.3.3-4-178
description: >
Object.getOwnPropertyDescriptor returns data desc (all false) for
properties on built-ins (Global.NaN)
-includes: [fnGlobalObject.js]
---*/
// in non-strict mode, 'this' is bound to the global object.
- var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), "NaN");
+ var desc = Object.getOwnPropertyDescriptor(this, "NaN");
assert.sameValue(desc.writable, false, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
diff --git a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-179.js b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-179.js
index 2cad474cd..6a38e5f06 100644
--- a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-179.js
+++ b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-179.js
@@ -6,11 +6,10 @@ es5id: 15.2.3.3-4-179
description: >
Object.getOwnPropertyDescriptor returns data desc (all false) for
properties on built-ins (Global.Infinity)
-includes: [fnGlobalObject.js]
---*/
// in non-strict mode, 'this' is bound to the global object.
- var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), "Infinity");
+ var desc = Object.getOwnPropertyDescriptor(this, "Infinity");
assert.sameValue(desc.writable, false, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
diff --git a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-180.js b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-180.js
index 9f73a8a37..65412185c 100644
--- a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-180.js
+++ b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-180.js
@@ -6,11 +6,10 @@ es5id: 15.2.3.3-4-180
description: >
Object.getOwnPropertyDescriptor returns data desc (all false) for
properties on built-ins (Global.undefined)
-includes: [fnGlobalObject.js]
---*/
// in non-strict mode, 'this' is bound to the global object.
- var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), "undefined");
+ var desc = Object.getOwnPropertyDescriptor(this, "undefined");
assert.sameValue(desc.writable, false, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
diff --git a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-4.js b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-4.js
index 26c26fd7e..a81aad268 100644
--- a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-4.js
+++ b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-4.js
@@ -6,10 +6,9 @@ es5id: 15.2.3.3-4-4
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Global.eval)
-includes: [fnGlobalObject.js]
---*/
- var global = fnGlobalObject();
+ var global = this;
var desc = Object.getOwnPropertyDescriptor(global, "eval");
assert.sameValue(desc.value, global.eval, 'desc.value');
diff --git a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-5.js b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-5.js
index fb442a071..d99651e90 100644
--- a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-5.js
+++ b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-5.js
@@ -6,10 +6,9 @@ es5id: 15.2.3.3-4-5
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Global.parseInt)
-includes: [fnGlobalObject.js]
---*/
- var global = fnGlobalObject();
+ var global = this;
var desc = Object.getOwnPropertyDescriptor(global, "parseInt");
assert.sameValue(desc.value, global.parseInt, 'desc.value');
diff --git a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-6.js b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-6.js
index f4287cf87..1e4a06e23 100644
--- a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-6.js
+++ b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-6.js
@@ -6,10 +6,9 @@ es5id: 15.2.3.3-4-6
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Global.parseFloat)
-includes: [fnGlobalObject.js]
---*/
- var global = fnGlobalObject();
+ var global = this;
var desc = Object.getOwnPropertyDescriptor(global, "parseFloat");
assert.sameValue(desc.value, global.parseFloat, 'desc.value');
diff --git a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-7.js b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-7.js
index ddeb2a079..1c410ce45 100644
--- a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-7.js
+++ b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-7.js
@@ -6,10 +6,9 @@ es5id: 15.2.3.3-4-7
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Global.isNaN)
-includes: [fnGlobalObject.js]
---*/
- var global = fnGlobalObject();
+ var global = this;
var desc = Object.getOwnPropertyDescriptor(global, "isNaN");
assert.sameValue(desc.value, global.isNaN, 'desc.value');
diff --git a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-8.js b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-8.js
index 39a189fd5..094fcbd88 100644
--- a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-8.js
+++ b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-8.js
@@ -6,10 +6,9 @@ es5id: 15.2.3.3-4-8
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Global.isFinite)
-includes: [fnGlobalObject.js]
---*/
- var global = fnGlobalObject();
+ var global = this;
var desc = Object.getOwnPropertyDescriptor(global, "isFinite");
assert.sameValue(desc.value, global.isFinite, 'desc.value');
diff --git a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-9.js b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-9.js
index cefada6b5..ff648971c 100644
--- a/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-9.js
+++ b/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-9.js
@@ -6,10 +6,9 @@ es5id: 15.2.3.3-4-9
description: >
Object.getOwnPropertyDescriptor returns data desc for functions on
built-ins (Global.decodeURI)
-includes: [fnGlobalObject.js]
---*/
- var global = fnGlobalObject();
+ var global = this;
var desc = Object.getOwnPropertyDescriptor(global, "decodeURI");
assert.sameValue(desc.value, global.decodeURI, 'desc.value');
diff --git a/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-global-object.js b/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-global-object.js
index e344e3e99..a76b5ba2a 100644
--- a/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-global-object.js
+++ b/test/built-ins/Object/getOwnPropertyDescriptors/tamper-with-global-object.js
@@ -6,7 +6,6 @@ description: >
Object.getOwnPropertyDescriptors should not have its behavior impacted by modifications to the global property Object
esid: pending
author: Jordan Harband
-includes: [fnGlobalObject.js]
---*/
function fakeObject() {
@@ -15,7 +14,7 @@ function fakeObject() {
fakeObject.getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors;
fakeObject.keys = Object.keys;
-var global = fnGlobalObject();
+var global = this;
global.Object = fakeObject;
assert.sameValue(Object, fakeObject, 'Sanity check failed: could not modify the global Object');
diff --git a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-1.js b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-1.js
index 6af3d418e..558377801 100644
--- a/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-1.js
+++ b/test/built-ins/Object/getOwnPropertyNames/15.2.3.4-4-1.js
@@ -4,10 +4,9 @@
/*---
es5id: 15.2.3.4-4-1
description: Object.getOwnPropertyNames returns array of property names (Global)
-includes: [fnGlobalObject.js]
---*/
- var result = Object.getOwnPropertyNames(fnGlobalObject());
+ var result = Object.getOwnPropertyNames(this);
var expResult = ["NaN", "Infinity", "undefined", "eval", "parseInt", "parseFloat", "isNaN", "isFinite", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "Object", "Function", "Array", "String", "Boolean", "Number", "Date", "Date", "RegExp", "Error", "EvalError", "RangeError", "ReferenceError", "SyntaxError", "TypeError", "URIError", "Math", "JSON"];
var result1 = {};
diff --git a/test/built-ins/Object/getPrototypeOf/15.2.3.2-2-30.js b/test/built-ins/Object/getPrototypeOf/15.2.3.2-2-30.js
index dceac2641..9fcd1fac8 100644
--- a/test/built-ins/Object/getPrototypeOf/15.2.3.2-2-30.js
+++ b/test/built-ins/Object/getPrototypeOf/15.2.3.2-2-30.js
@@ -6,9 +6,8 @@ es5id: 15.2.3.2-2-30
description: >
Object.getPrototypeOf returns the [[Prototype]] of its parameter
(the global object)
-includes: [fnGlobalObject.js]
---*/
- var proto = Object.getPrototypeOf(fnGlobalObject());
+ var proto = Object.getPrototypeOf(this);
-assert.sameValue(proto.isPrototypeOf(fnGlobalObject()), true, 'proto.isPrototypeOf(fnGlobalObject())');
+assert.sameValue(proto.isPrototypeOf(this), true, 'proto.isPrototypeOf(this)');
diff --git a/test/built-ins/Object/isExtensible/15.2.3.13-2-1.js b/test/built-ins/Object/isExtensible/15.2.3.13-2-1.js
index e5e2ed3a1..663ccbbae 100644
--- a/test/built-ins/Object/isExtensible/15.2.3.13-2-1.js
+++ b/test/built-ins/Object/isExtensible/15.2.3.13-2-1.js
@@ -4,10 +4,9 @@
/*---
es5id: 15.2.3.13-2-1
description: Object.isExtensible returns true for all built-in objects (Global)
-includes: [fnGlobalObject.js]
---*/
-var global = fnGlobalObject();
+var global = this;
assert(Object.isExtensible(global));
diff --git a/test/built-ins/Object/isExtensible/15.2.3.13-2-29.js b/test/built-ins/Object/isExtensible/15.2.3.13-2-29.js
index 178d0f6dd..3c2750c35 100644
--- a/test/built-ins/Object/isExtensible/15.2.3.13-2-29.js
+++ b/test/built-ins/Object/isExtensible/15.2.3.13-2-29.js
@@ -4,7 +4,6 @@
/*---
es5id: 15.2.3.13-2-29
description: Object.isExtensible returns true for the global object
-includes: [fnGlobalObject.js]
---*/
-assert(Object.isExtensible(fnGlobalObject()), 'Object.isExtensible(fnGlobalObject()) !== true');
+assert(Object.isExtensible(this), 'Object.isExtensible(this) !== true');
diff --git a/test/built-ins/Object/isFrozen/15.2.3.12-3-1.js b/test/built-ins/Object/isFrozen/15.2.3.12-3-1.js
index 12a2e9b5f..7cd453d37 100644
--- a/test/built-ins/Object/isFrozen/15.2.3.12-3-1.js
+++ b/test/built-ins/Object/isFrozen/15.2.3.12-3-1.js
@@ -4,7 +4,6 @@
/*---
es5id: 15.2.3.12-3-1
description: Object.isFrozen returns false for all built-in objects (Global)
-includes: [fnGlobalObject.js]
---*/
-assert(!Object.isFrozen(fnGlobalObject()));
+assert(!Object.isFrozen(this));
diff --git a/test/built-ins/Object/isSealed/15.2.3.11-4-1.js b/test/built-ins/Object/isSealed/15.2.3.11-4-1.js
index dfd9b38ae..23ede288d 100644
--- a/test/built-ins/Object/isSealed/15.2.3.11-4-1.js
+++ b/test/built-ins/Object/isSealed/15.2.3.11-4-1.js
@@ -4,7 +4,6 @@
/*---
es5id: 15.2.3.11-4-1
description: Object.isSealed returns false for all built-in objects (Global)
-includes: [fnGlobalObject.js]
---*/
-assert(!Object.isSealed(fnGlobalObject()));
+assert(!Object.isSealed(this));
diff --git a/test/built-ins/Object/keys/15.2.3.14-6-6.js b/test/built-ins/Object/keys/15.2.3.14-6-6.js
index 5322bd3b5..bb191c76d 100644
--- a/test/built-ins/Object/keys/15.2.3.14-6-6.js
+++ b/test/built-ins/Object/keys/15.2.3.14-6-6.js
@@ -6,10 +6,9 @@ es5id: 15.2.3.14-6-6
description: >
Object.keys - the order of elements in returned array is the same
with the order of properties in 'O' (global Object)
-includes: [fnGlobalObject.js]
---*/
- var obj = fnGlobalObject();
+ var obj = this;
var tempArray = [];
for (var p in obj) {
diff --git a/test/built-ins/Promise/S25.4.3.1_A1.1_T1.js b/test/built-ins/Promise/S25.4.3.1_A1.1_T1.js
index ac5cc6d0d..aec77173e 100644
--- a/test/built-ins/Promise/S25.4.3.1_A1.1_T1.js
+++ b/test/built-ins/Promise/S25.4.3.1_A1.1_T1.js
@@ -7,10 +7,9 @@ info: >
es6id: S25.4.3.1_A1.1_T1
author: Sam Mikes
description: Promise === global.Promise
-includes: [fnGlobalObject.js]
---*/
-var global = fnGlobalObject();
+var global = this;
if (Promise !== global.Promise) {
$ERROR("Expected Promise === global.Promise.");
diff --git a/test/built-ins/Promise/S25.4.3.1_A5.1_T1.js b/test/built-ins/Promise/S25.4.3.1_A5.1_T1.js
index f74ccebdd..e5a6f19f8 100644
--- a/test/built-ins/Promise/S25.4.3.1_A5.1_T1.js
+++ b/test/built-ins/Promise/S25.4.3.1_A5.1_T1.js
@@ -10,10 +10,9 @@ es6id: S25.4.3.1_A5.1_T1
author: Sam Mikes
description: Promise executor gets default handling for 'this'
flags: [async, noStrict]
-includes: [fnGlobalObject.js]
---*/
-var expectedThis = fnGlobalObject();
+var expectedThis = this;
var p = new Promise(function (resolve) {
if (this !== expectedThis) {
diff --git a/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-invoke-nonstrict.js b/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-invoke-nonstrict.js
index 7861def38..887089ab7 100644
--- a/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-invoke-nonstrict.js
+++ b/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-invoke-nonstrict.js
@@ -10,10 +10,9 @@ author: Sam Mikes
description: >
"fulfilled" handler invoked correctly outside of strict mode
flags: [async, noStrict]
-includes: [fnGlobalObject.js]
---*/
-var expectedThis = fnGlobalObject(),
+var expectedThis = this,
obj = {};
var p = Promise.resolve(obj).then(function(arg) {
diff --git a/test/built-ins/Promise/prototype/then/rxn-handler-rejected-invoke-nonstrict.js b/test/built-ins/Promise/prototype/then/rxn-handler-rejected-invoke-nonstrict.js
index d01480d0c..6e87d4f16 100644
--- a/test/built-ins/Promise/prototype/then/rxn-handler-rejected-invoke-nonstrict.js
+++ b/test/built-ins/Promise/prototype/then/rxn-handler-rejected-invoke-nonstrict.js
@@ -10,10 +10,9 @@ author: Sam Mikes
description: >
"rejected" handler invoked correctly outside of strict mode
flags: [async, noStrict]
-includes: [fnGlobalObject.js]
---*/
-var expectedThis = fnGlobalObject(),
+var expectedThis = this,
obj = {};
var p = Promise.reject(obj).then(function () {
diff --git a/test/built-ins/RegExp/prototype/Symbol.replace/fn-invoke-this-no-strict.js b/test/built-ins/RegExp/prototype/Symbol.replace/fn-invoke-this-no-strict.js
index 654d7b7ef..22a2a0cc5 100644
--- a/test/built-ins/RegExp/prototype/Symbol.replace/fn-invoke-this-no-strict.js
+++ b/test/built-ins/RegExp/prototype/Symbol.replace/fn-invoke-this-no-strict.js
@@ -16,7 +16,6 @@ info: >
iv. Let replValue be Call(replaceValue, undefined, replacerArgs).
[...]
flags: [noStrict]
-includes: [fnGlobalObject.js]
features: [Symbol.replace]
---*/
@@ -27,4 +26,4 @@ var replacer = function() {
/./[Symbol.replace]('x', replacer);
-assert.sameValue(thisVal, fnGlobalObject());
+assert.sameValue(thisVal, this);
diff --git a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T3.js b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T3.js
index 32bf29539..dd8713565 100644
--- a/test/built-ins/String/prototype/match/S15.5.4.10_A1_T3.js
+++ b/test/built-ins/String/prototype/match/S15.5.4.10_A1_T3.js
@@ -5,18 +5,17 @@
info: String.prototype.match (regexp)
es5id: 15.5.4.10_A1_T3
description: Checking by using eval
-includes: [fnGlobalObject.js]
---*/
-var match = String.prototype.match.bind(fnGlobalObject());
+var match = String.prototype.match.bind(this);
try {
- fnGlobalObject().toString = Object.prototype.toString;
+ this.toString = Object.prototype.toString;
} catch (e) { ; }
//////////////////////////////////////////////////////////////////////////////
//CHECK#1
-if ((fnGlobalObject().toString === Object.prototype.toString) && //Ensure we could overwrite global obj's toString
+if ((this.toString === Object.prototype.toString) && //Ensure we could overwrite global obj's toString
(match(eval("\"bj\""))[0] !== "bj")) {
$ERROR('#1: match = String.prototype.match.bind(this); match(eval("\\"bj\\""))[0] === "bj". Actual: '+match(eval("\"bj\""))[0] );
}
diff --git a/test/built-ins/String/prototype/replace/15.5.4.11-1.js b/test/built-ins/String/prototype/replace/15.5.4.11-1.js
index 7d337df78..5cc4a8ce9 100644
--- a/test/built-ins/String/prototype/replace/15.5.4.11-1.js
+++ b/test/built-ins/String/prototype/replace/15.5.4.11-1.js
@@ -7,12 +7,12 @@ description: >
'this' object used by the replaceValue function of a
String.prototype.replace invocation
flags: [noStrict]
-includes: [fnGlobalObject.js]
---*/
+var global = this;
var retVal = 'x'.replace(/x/,
function() {
- if (this===fnGlobalObject()) {
+ if (this===global) {
return 'y';
} else {
return 'z';
diff --git a/test/built-ins/TypedArrays/from/mapfn-this-without-thisarg-non-strict.js b/test/built-ins/TypedArrays/from/mapfn-this-without-thisarg-non-strict.js
index e5d4d5ac1..455d9b446 100644
--- a/test/built-ins/TypedArrays/from/mapfn-this-without-thisarg-non-strict.js
+++ b/test/built-ins/TypedArrays/from/mapfn-this-without-thisarg-non-strict.js
@@ -15,12 +15,12 @@ info: >
c. If mapping is true, then
i. Let mappedValue be ? Call(mapfn, T, « kValue, k »).
...
-includes: [testTypedArray.js, fnGlobalObject.js]
+includes: [testTypedArray.js]
flags: [noStrict]
---*/
var source = [42, 43];
-var global = fnGlobalObject();
+var global = this;
testWithTypedArrayConstructors(function(TA) {
var results = [];
diff --git a/test/built-ins/undefined/15.1.1.3-0.js b/test/built-ins/undefined/15.1.1.3-0.js
index ff51a3ab1..f99520987 100644
--- a/test/built-ins/undefined/15.1.1.3-0.js
+++ b/test/built-ins/undefined/15.1.1.3-0.js
@@ -6,10 +6,9 @@ es5id: 15.1.1.3-0
description: >
Global.undefined is a data property with default attribute values
(false)
-includes: [fnGlobalObject.js]
---*/
- var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), 'undefined');
+ var desc = Object.getOwnPropertyDescriptor(this, 'undefined');
assert.sameValue(desc.writable, false, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
diff --git a/test/built-ins/undefined/15.1.1.3-2.js b/test/built-ins/undefined/15.1.1.3-2.js
index 9c51239f8..b1726375c 100644
--- a/test/built-ins/undefined/15.1.1.3-2.js
+++ b/test/built-ins/undefined/15.1.1.3-2.js
@@ -5,10 +5,9 @@
es5id: 15.1.1.3-2
description: undefined is not writable, should throw TypeError in strict mode
flags: [onlyStrict]
-includes: [fnGlobalObject.js]
---*/
-var global = fnGlobalObject();
+var global = this;
assert.throws(TypeError, function() {
global["undefined"] = 5; // Should throw a TypeError as per 8.12.5
diff --git a/test/built-ins/undefined/S15.1.1.3_A3_T1.js b/test/built-ins/undefined/S15.1.1.3_A3_T1.js
index 43d8ec4f7..9036c5a75 100644
--- a/test/built-ins/undefined/S15.1.1.3_A3_T1.js
+++ b/test/built-ins/undefined/S15.1.1.3_A3_T1.js
@@ -5,14 +5,14 @@
info: The undefined is DontDelete
es5id: 15.1.1.3_A3.1
description: Use delete
-includes: [propertyHelper.js, fnGlobalObject.js]
+includes: [propertyHelper.js]
---*/
// CHECK#1
-verifyNotConfigurable(fnGlobalObject(), "undefined");
+verifyNotConfigurable(this, "undefined");
try {
- if (delete fnGlobalObject().undefined !== false) {
+ if (delete this.undefined !== false) {
$ERROR('#1: delete undefined === false.');
}
} catch (e) {
diff --git a/test/intl402/Intl/8.0_L15.js b/test/intl402/Intl/8.0_L15.js
index fc0b04259..cb68bcb0a 100644
--- a/test/intl402/Intl/8.0_L15.js
+++ b/test/intl402/Intl/8.0_L15.js
@@ -8,10 +8,8 @@ description: >
defined by the introduction of chapter 17 of the ECMAScript
Language Specification.
author: Norbert Lindenberg
-includes:
- - fnGlobalObject.js
- - testBuiltInObject.js
+includes: [testBuiltInObject.js]
---*/
-testBuiltInObject(fnGlobalObject().Intl, false, false, []);
+testBuiltInObject(this.Intl, false, false, []);
testBuiltInObject(Intl, false, false, ["Collator", "NumberFormat", "DateTimeFormat"]);
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;
}
})();