summaryrefslogtreecommitdiff
path: root/test/built-ins/Promise
diff options
context:
space:
mode:
authorAndré Bargull <andre.bargull@gmail.com>2018-02-09 09:09:47 -0800
committerLeo Balter <leonardo.balter@gmail.com>2018-02-09 12:09:47 -0500
commitf95b56ab28c5f18150f30fbfa889a4f6ba0e50a1 (patch)
treed403f704c1b6a1842f12df380651919beaaf5fef /test/built-ins/Promise
parenta01de4a722d088055a7d84d8c691ddd7109edb34 (diff)
downloadqtdeclarative-testsuites-f95b56ab28c5f18150f30fbfa889a4f6ba0e50a1.tar.gz
Revert "js-beautify: make all indentation consistent (depth & character) (#1409)" (#1412)
This reverts commit a01de4a722d088055a7d84d8c691ddd7109edb34.
Diffstat (limited to 'test/built-ins/Promise')
-rw-r--r--test/built-ins/Promise/S25.4.3.1_A1.1_T1.js2
-rw-r--r--test/built-ins/Promise/S25.4.3.1_A2.1_T1.js2
-rw-r--r--test/built-ins/Promise/S25.4.3.1_A2.2_T1.js4
-rw-r--r--test/built-ins/Promise/S25.4.3.1_A2.3_T1.js20
-rw-r--r--test/built-ins/Promise/S25.4.3.1_A2.4_T1.js20
-rw-r--r--test/built-ins/Promise/S25.4.3.1_A4.1_T1.js17
-rw-r--r--test/built-ins/Promise/S25.4.3.1_A5.1_T1.js10
-rw-r--r--test/built-ins/Promise/S25.4.3.1_A5.1_T2.js10
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A1.1_T1.js2
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A2.1_T1.js2
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A2.2_T1.js12
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A2.3_T1.js8
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A2.3_T2.js8
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A2.3_T3.js8
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A3.1_T1.js12
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A3.1_T2.js14
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A3.1_T3.js20
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A4.1_T1.js3
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A5.1_T1.js20
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A6.1_T1.js2
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A6.1_T2.js14
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A7.1_T1.js26
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A7.2_T1.js22
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A8.1_T1.js26
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A8.2_T1.js20
-rw-r--r--test/built-ins/Promise/all/S25.4.4.1_A8.2_T2.js20
-rw-r--r--test/built-ins/Promise/all/call-resolve-element-after-return.js4
-rw-r--r--test/built-ins/Promise/all/call-resolve-element-items.js4
-rw-r--r--test/built-ins/Promise/all/call-resolve-element.js4
-rw-r--r--test/built-ins/Promise/all/capability-executor-called-twice.js14
-rw-r--r--test/built-ins/Promise/all/capability-executor-not-callable.js4
-rw-r--r--test/built-ins/Promise/all/capability-resolve-throws-no-close.js8
-rw-r--r--test/built-ins/Promise/all/capability-resolve-throws-reject.js4
-rw-r--r--test/built-ins/Promise/all/does-not-invoke-array-setters.js4
-rw-r--r--test/built-ins/Promise/all/invoke-resolve-error-close.js5
-rw-r--r--test/built-ins/Promise/all/invoke-resolve-get-error-close.js4
-rw-r--r--test/built-ins/Promise/all/invoke-then-error-close.js5
-rw-r--r--test/built-ins/Promise/all/invoke-then-get-error-close.js5
-rw-r--r--test/built-ins/Promise/all/new-resolve-function.js9
-rw-r--r--test/built-ins/Promise/all/reject-deferred.js4
-rw-r--r--test/built-ins/Promise/all/reject-ignored-deferred.js8
-rw-r--r--test/built-ins/Promise/all/resolve-before-loop-exit-from-same.js4
-rw-r--r--test/built-ins/Promise/all/resolve-before-loop-exit.js4
-rw-r--r--test/built-ins/Promise/all/resolve-element-function-extensible.js7
-rw-r--r--test/built-ins/Promise/all/resolve-element-function-length.js7
-rw-r--r--test/built-ins/Promise/all/resolve-element-function-name.js7
-rw-r--r--test/built-ins/Promise/all/resolve-element-function-nonconstructor.js11
-rw-r--r--test/built-ins/Promise/all/resolve-element-function-prototype.js7
-rw-r--r--test/built-ins/Promise/all/resolve-from-same-thenable.js4
-rw-r--r--test/built-ins/Promise/all/resolve-poisoned-then.js16
-rw-r--r--test/built-ins/Promise/all/resolve-thenable.js16
-rw-r--r--test/built-ins/Promise/all/same-reject-function.js9
-rw-r--r--test/built-ins/Promise/all/species-get-error.js2
-rw-r--r--test/built-ins/Promise/executor-function-extensible.js3
-rw-r--r--test/built-ins/Promise/executor-function-length.js3
-rw-r--r--test/built-ins/Promise/executor-function-name.js3
-rw-r--r--test/built-ins/Promise/executor-function-nonconstructor.js7
-rw-r--r--test/built-ins/Promise/executor-function-prototype.js3
-rw-r--r--test/built-ins/Promise/prototype/S25.4.4.2_A1.1_T1.js2
-rw-r--r--test/built-ins/Promise/prototype/S25.4.5_A3.1_T1.js3
-rw-r--r--test/built-ins/Promise/prototype/catch/S25.4.5.1_A1.1_T1.js2
-rw-r--r--test/built-ins/Promise/prototype/catch/S25.4.5.1_A2.1_T1.js2
-rw-r--r--test/built-ins/Promise/prototype/catch/S25.4.5.1_A3.1_T1.js13
-rw-r--r--test/built-ins/Promise/prototype/catch/S25.4.5.1_A3.1_T2.js13
-rw-r--r--test/built-ins/Promise/prototype/catch/this-value-obj-coercible.js16
-rw-r--r--test/built-ins/Promise/prototype/catch/this-value-then-not-callable.js24
-rw-r--r--test/built-ins/Promise/prototype/finally/invokes-then-with-function.js6
-rw-r--r--test/built-ins/Promise/prototype/finally/invokes-then-with-non-function.js2
-rw-r--r--test/built-ins/Promise/prototype/finally/rejected-observable-then-calls.js12
-rw-r--r--test/built-ins/Promise/prototype/finally/rejection-reason-override-with-throw.js6
-rw-r--r--test/built-ins/Promise/prototype/finally/resolution-value-no-override.js4
-rw-r--r--test/built-ins/Promise/prototype/finally/resolved-observable-then-calls.js13
-rw-r--r--test/built-ins/Promise/prototype/finally/species-symbol.js8
-rw-r--r--test/built-ins/Promise/prototype/finally/subclass-species-constructor-reject-count.js4
-rw-r--r--test/built-ins/Promise/prototype/finally/subclass-species-constructor-resolve-count.js4
-rw-r--r--test/built-ins/Promise/prototype/finally/this-value-non-promise.js4
-rw-r--r--test/built-ins/Promise/prototype/finally/this-value-then-not-callable.js6
-rw-r--r--test/built-ins/Promise/prototype/finally/this-value-then-poisoned.js2
-rw-r--r--test/built-ins/Promise/prototype/finally/this-value-then-throws.js2
-rw-r--r--test/built-ins/Promise/prototype/then/S25.4.4_A1.1_T1.js34
-rw-r--r--test/built-ins/Promise/prototype/then/S25.4.4_A2.1_T1.js20
-rw-r--r--test/built-ins/Promise/prototype/then/S25.4.4_A2.1_T2.js22
-rw-r--r--test/built-ins/Promise/prototype/then/S25.4.4_A2.1_T3.js30
-rw-r--r--test/built-ins/Promise/prototype/then/S25.4.5.3_A1.1_T1.js2
-rw-r--r--test/built-ins/Promise/prototype/then/S25.4.5.3_A1.1_T2.js8
-rw-r--r--test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T1.js4
-rw-r--r--test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T2.js5
-rw-r--r--test/built-ins/Promise/prototype/then/S25.4.5.3_A4.1_T1.js10
-rw-r--r--test/built-ins/Promise/prototype/then/S25.4.5.3_A4.1_T2.js14
-rw-r--r--test/built-ins/Promise/prototype/then/S25.4.5.3_A4.2_T1.js10
-rw-r--r--test/built-ins/Promise/prototype/then/S25.4.5.3_A4.2_T2.js12
-rw-r--r--test/built-ins/Promise/prototype/then/S25.4.5.3_A5.1_T1.js32
-rw-r--r--test/built-ins/Promise/prototype/then/S25.4.5.3_A5.2_T1.js30
-rw-r--r--test/built-ins/Promise/prototype/then/S25.4.5.3_A5.3_T1.js40
-rw-r--r--test/built-ins/Promise/prototype/then/capability-executor-called-twice.js16
-rw-r--r--test/built-ins/Promise/prototype/then/capability-executor-not-callable.js6
-rw-r--r--test/built-ins/Promise/prototype/then/ctor-access-count.js20
-rw-r--r--test/built-ins/Promise/prototype/then/ctor-poisoned.js6
-rw-r--r--test/built-ins/Promise/prototype/then/ctor-throws.js8
-rw-r--r--test/built-ins/Promise/prototype/then/prfm-fulfilled.js20
-rw-r--r--test/built-ins/Promise/prototype/then/prfm-pending-fulfulled.js20
-rw-r--r--test/built-ins/Promise/prototype/then/prfm-pending-rejected.js20
-rw-r--r--test/built-ins/Promise/prototype/then/prfm-rejected.js20
-rw-r--r--test/built-ins/Promise/prototype/then/reject-pending-fulfilled.js28
-rw-r--r--test/built-ins/Promise/prototype/then/reject-pending-rejected.js28
-rw-r--r--test/built-ins/Promise/prototype/then/reject-settled-fulfilled.js28
-rw-r--r--test/built-ins/Promise/prototype/then/reject-settled-rejected.js28
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-non-obj.js24
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-non-thenable.js28
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-poisoned-then.js24
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-prms-cstm-then.js30
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-self.js36
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-thenable.js28
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-pending-rejected-non-obj.js24
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-pending-rejected-non-thenable.js28
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-pending-rejected-poisoned-then.js24
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-pending-rejected-prms-cstm-then.js30
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-pending-rejected-self.js36
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-pending-rejected-thenable.js28
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-non-obj.js24
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-non-thenable.js28
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-poisoned-then.js24
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-prms-cstm-then.js30
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-self.js36
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-thenable.js28
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-settled-rejected-non-obj.js24
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-settled-rejected-non-thenable.js28
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-settled-rejected-poisoned-then.js24
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-settled-rejected-prms-cstm-then.js30
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-settled-rejected-self.js36
-rw-r--r--test/built-ins/Promise/prototype/then/resolve-settled-rejected-thenable.js28
-rw-r--r--test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-invoke-nonstrict.js28
-rw-r--r--test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-invoke-strict.js28
-rw-r--r--test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-next-abrupt.js34
-rw-r--r--test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-next.js46
-rw-r--r--test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-return-abrupt.js20
-rw-r--r--test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-return-normal.js20
-rw-r--r--test/built-ins/Promise/prototype/then/rxn-handler-identity.js20
-rw-r--r--test/built-ins/Promise/prototype/then/rxn-handler-rejected-invoke-nonstrict.js32
-rw-r--r--test/built-ins/Promise/prototype/then/rxn-handler-rejected-invoke-strict.js32
-rw-r--r--test/built-ins/Promise/prototype/then/rxn-handler-rejected-next-abrupt.js34
-rw-r--r--test/built-ins/Promise/prototype/then/rxn-handler-rejected-next.js46
-rw-r--r--test/built-ins/Promise/prototype/then/rxn-handler-rejected-return-abrupt.js20
-rw-r--r--test/built-ins/Promise/prototype/then/rxn-handler-rejected-return-normal.js20
-rw-r--r--test/built-ins/Promise/prototype/then/rxn-handler-thrower.js20
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A1.1_T1.js2
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A2.1_T1.js2
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A2.2_T1.js13
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A2.2_T2.js13
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A2.2_T3.js19
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A3.1_T1.js3
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A3.1_T2.js4
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A4.1_T1.js23
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A4.1_T2.js41
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A5.1_T1.js8
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A6.1_T1.js18
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A6.2_T1.js24
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A7.1_T1.js28
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A7.1_T2.js28
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A7.1_T3.js30
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A7.2_T1.js32
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A7.3_T1.js16
-rw-r--r--test/built-ins/Promise/race/S25.4.4.3_A7.3_T2.js21
-rw-r--r--test/built-ins/Promise/race/capability-executor-called-twice.js14
-rw-r--r--test/built-ins/Promise/race/capability-executor-not-callable.js4
-rw-r--r--test/built-ins/Promise/race/invoke-resolve-error-close.js5
-rw-r--r--test/built-ins/Promise/race/invoke-resolve-get-error-close.js4
-rw-r--r--test/built-ins/Promise/race/invoke-then-error-close.js5
-rw-r--r--test/built-ins/Promise/race/invoke-then-get-error-close.js5
-rw-r--r--test/built-ins/Promise/race/reject-deferred.js4
-rw-r--r--test/built-ins/Promise/race/reject-ignored-deferred.js8
-rw-r--r--test/built-ins/Promise/race/resolve-prms-cstm-then.js4
-rw-r--r--test/built-ins/Promise/race/resolve-self.js28
-rw-r--r--test/built-ins/Promise/race/same-reject-function.js9
-rw-r--r--test/built-ins/Promise/race/same-resolve-function.js9
-rw-r--r--test/built-ins/Promise/race/species-get-error.js2
-rw-r--r--test/built-ins/Promise/reject-function-nonconstructor.js4
-rw-r--r--test/built-ins/Promise/reject-ignored-via-abrupt.js8
-rw-r--r--test/built-ins/Promise/reject-ignored-via-fn-deferred.js8
-rw-r--r--test/built-ins/Promise/reject-ignored-via-fn-immed.js8
-rw-r--r--test/built-ins/Promise/reject-via-abrupt-queue.js20
-rw-r--r--test/built-ins/Promise/reject-via-abrupt.js16
-rw-r--r--test/built-ins/Promise/reject-via-fn-deferred-queue.js22
-rw-r--r--test/built-ins/Promise/reject-via-fn-deferred.js16
-rw-r--r--test/built-ins/Promise/reject-via-fn-immed-queue.js22
-rw-r--r--test/built-ins/Promise/reject-via-fn-immed.js16
-rw-r--r--test/built-ins/Promise/reject/S25.4.4.4_A1.1_T1.js2
-rw-r--r--test/built-ins/Promise/reject/S25.4.4.4_A2.1_T1.js14
-rw-r--r--test/built-ins/Promise/reject/S25.4.4.4_A3.1_T1.js3
-rw-r--r--test/built-ins/Promise/reject/capability-executor-called-twice.js14
-rw-r--r--test/built-ins/Promise/reject/capability-executor-not-callable.js4
-rw-r--r--test/built-ins/Promise/reject/capability-invocation.js4
-rw-r--r--test/built-ins/Promise/resolve-function-nonconstructor.js4
-rw-r--r--test/built-ins/Promise/resolve-ignored-via-fn-deferred.js8
-rw-r--r--test/built-ins/Promise/resolve-ignored-via-fn-immed.js8
-rw-r--r--test/built-ins/Promise/resolve-non-obj-deferred.js16
-rw-r--r--test/built-ins/Promise/resolve-non-obj-immed.js16
-rw-r--r--test/built-ins/Promise/resolve-non-thenable-deferred.js20
-rw-r--r--test/built-ins/Promise/resolve-non-thenable-immed.js20
-rw-r--r--test/built-ins/Promise/resolve-poisoned-then-deferred.js16
-rw-r--r--test/built-ins/Promise/resolve-poisoned-then-immed.js16
-rw-r--r--test/built-ins/Promise/resolve-prms-cstm-then-deferred.js20
-rw-r--r--test/built-ins/Promise/resolve-prms-cstm-then-immed.js30
-rw-r--r--test/built-ins/Promise/resolve-self.js24
-rw-r--r--test/built-ins/Promise/resolve-thenable-deferred.js20
-rw-r--r--test/built-ins/Promise/resolve-thenable-immed.js20
-rw-r--r--test/built-ins/Promise/resolve/S25.4.4.5_A1.1_T1.js2
-rw-r--r--test/built-ins/Promise/resolve/S25.4.4.5_A2.1_T1.js4
-rw-r--r--test/built-ins/Promise/resolve/S25.4.4.5_A2.2_T1.js18
-rw-r--r--test/built-ins/Promise/resolve/S25.4.4.5_A2.3_T1.js22
-rw-r--r--test/built-ins/Promise/resolve/S25.4.4.5_A3.1_T1.js30
-rw-r--r--test/built-ins/Promise/resolve/S25.4.4.5_A4.1_T1.js16
-rw-r--r--test/built-ins/Promise/resolve/S25.Promise_resolve_foreign_thenable_1.js10
-rw-r--r--test/built-ins/Promise/resolve/S25.Promise_resolve_foreign_thenable_2.js20
-rw-r--r--test/built-ins/Promise/resolve/capability-executor-called-twice.js14
-rw-r--r--test/built-ins/Promise/resolve/capability-executor-not-callable.js4
-rw-r--r--test/built-ins/Promise/resolve/context-non-object-with-promise.js2
-rw-r--r--test/built-ins/Promise/resolve/resolve-from-promise-capability.js4
-rw-r--r--test/built-ins/Promise/resolve/resolve-non-obj.js16
-rw-r--r--test/built-ins/Promise/resolve/resolve-non-thenable.js16
-rw-r--r--test/built-ins/Promise/resolve/resolve-poisoned-then.js16
-rw-r--r--test/built-ins/Promise/resolve/resolve-prms-cstm-then.js12
-rw-r--r--test/built-ins/Promise/resolve/resolve-thenable.js16
223 files changed, 1542 insertions, 1797 deletions
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 06f9f6fb6..6292c438e 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
@@ -12,5 +12,5 @@ description: Promise === global.Promise
var global = this;
if (Promise !== global.Promise) {
- $ERROR("Expected Promise === global.Promise.");
+ $ERROR("Expected Promise === global.Promise.");
}
diff --git a/test/built-ins/Promise/S25.4.3.1_A2.1_T1.js b/test/built-ins/Promise/S25.4.3.1_A2.1_T1.js
index afbef52ee..8da80d846 100644
--- a/test/built-ins/Promise/S25.4.3.1_A2.1_T1.js
+++ b/test/built-ins/Promise/S25.4.3.1_A2.1_T1.js
@@ -10,5 +10,5 @@ description: Promise.call("non-object") throws TypeError
---*/
assert.throws(TypeError, function() {
- Promise.call("non-object", function() {});
+ Promise.call("non-object", function () {});
});
diff --git a/test/built-ins/Promise/S25.4.3.1_A2.2_T1.js b/test/built-ins/Promise/S25.4.3.1_A2.2_T1.js
index 855595e76..0e969f652 100644
--- a/test/built-ins/Promise/S25.4.3.1_A2.2_T1.js
+++ b/test/built-ins/Promise/S25.4.3.1_A2.2_T1.js
@@ -11,6 +11,6 @@ description: Promise.call(new Promise()) throws TypeError
var p = new Promise(function() {});
-assert.throws(TypeError, function() {
- Promise.call(p, function() {});
+assert.throws(TypeError, function () {
+ Promise.call(p, function () {});
});
diff --git a/test/built-ins/Promise/S25.4.3.1_A2.3_T1.js b/test/built-ins/Promise/S25.4.3.1_A2.3_T1.js
index 424b1a7f1..341dd6417 100644
--- a/test/built-ins/Promise/S25.4.3.1_A2.3_T1.js
+++ b/test/built-ins/Promise/S25.4.3.1_A2.3_T1.js
@@ -10,16 +10,14 @@ description: Promise.call(resolved Promise) throws TypeError
flags: [async]
---*/
-var p = new Promise(function(resolve) {
- resolve(1);
-});
+var p = new Promise(function(resolve) { resolve(1); });
-p.then(function() {
- Promise.call(p, function() {});
-}).then(function() {
- $ERROR("Unexpected resolution - expected TypeError");
-}, function(err) {
- if (!(err instanceof TypeError)) {
- $ERROR("Expected TypeError, got " + err);
- }
+p.then(function () {
+ Promise.call(p, function () {});
+}).then(function () {
+ $ERROR("Unexpected resolution - expected TypeError");
+}, function (err) {
+ if (!(err instanceof TypeError)) {
+ $ERROR("Expected TypeError, got " + err);
+ }
}).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/S25.4.3.1_A2.4_T1.js b/test/built-ins/Promise/S25.4.3.1_A2.4_T1.js
index e852b0274..4b3e452e2 100644
--- a/test/built-ins/Promise/S25.4.3.1_A2.4_T1.js
+++ b/test/built-ins/Promise/S25.4.3.1_A2.4_T1.js
@@ -10,16 +10,14 @@ description: Promise.call(rejected Promise) throws TypeError
flags: [async]
---*/
-var p = new Promise(function(resolve, reject) {
- reject(1)
-});
+var p = new Promise(function(resolve, reject) { reject(1) });
-p.catch(function() {
- Promise.call(p, function() {});
-}).then(function() {
- $ERROR("Unexpected resolution - expected TypeError");
-}, function(err) {
- if (!(err instanceof TypeError)) {
- $ERROR("Expected TypeError, got " + err);
- }
+p.catch(function () {
+ Promise.call(p, function () {});
+}).then(function () {
+ $ERROR("Unexpected resolution - expected TypeError");
+}, function (err) {
+ if (!(err instanceof TypeError)) {
+ $ERROR("Expected TypeError, got " + err);
+ }
}).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/S25.4.3.1_A4.1_T1.js b/test/built-ins/Promise/S25.4.3.1_A4.1_T1.js
index 26d1cb0ce..d990b5448 100644
--- a/test/built-ins/Promise/S25.4.3.1_A4.1_T1.js
+++ b/test/built-ins/Promise/S25.4.3.1_A4.1_T1.js
@@ -12,14 +12,15 @@ flags: [async]
---*/
var errorObject = {},
- p = new Promise(function() {
- throw errorObject;
- });
+ p = new Promise(function () {
+ throw errorObject;
+ });
p.then(function() {
- $ERROR("Unexpected fulfill -- promise should reject.");
-}, function(err) {
- if (err !== errorObject) {
- $ERROR("Expected promise rejection reason to be thrown errorObject, actually " + err);
- }
+ $ERROR("Unexpected fulfill -- promise should reject.");
+}, function (err) {
+ if (err !== errorObject) {
+ $ERROR("Expected promise rejection reason to be thrown errorObject, actually " + err);
+ }
}).then($DONE, $DONE);
+
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 da4221c47..418f94069 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
@@ -14,10 +14,10 @@ flags: [async, noStrict]
var expectedThis = this;
-var p = new Promise(function(resolve) {
- if (this !== expectedThis) {
- $ERROR("'this' must be global object, got " + this);
- }
+var p = new Promise(function (resolve) {
+ if (this !== expectedThis) {
+ $ERROR("'this' must be global object, got " + this);
+ }
- resolve();
+ resolve();
}).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/S25.4.3.1_A5.1_T2.js b/test/built-ins/Promise/S25.4.3.1_A5.1_T2.js
index 58cdb04d1..3c0548704 100644
--- a/test/built-ins/Promise/S25.4.3.1_A5.1_T2.js
+++ b/test/built-ins/Promise/S25.4.3.1_A5.1_T2.js
@@ -14,10 +14,10 @@ flags: [async, onlyStrict]
var expectedThis = undefined;
-var p = new Promise(function(resolve) {
- if (this !== expectedThis) {
- $ERROR("'this' must be undefined, got " + this);
- }
+var p = new Promise(function (resolve) {
+ if (this !== expectedThis) {
+ $ERROR("'this' must be undefined, got " + this);
+ }
- resolve();
+ resolve();
}).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A1.1_T1.js b/test/built-ins/Promise/all/S25.4.4.1_A1.1_T1.js
index 02c7922d3..597b68aa9 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A1.1_T1.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A1.1_T1.js
@@ -9,5 +9,5 @@ description: Promise.all is callable
---*/
if ((typeof Promise.all) !== "function") {
- $ERROR('Expected Promise.all to be a function');
+ $ERROR('Expected Promise.all to be a function');
}
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A2.1_T1.js b/test/built-ins/Promise/all/S25.4.4.1_A2.1_T1.js
index e542fadf4..92149f2aa 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A2.1_T1.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A2.1_T1.js
@@ -10,5 +10,5 @@ description: Promise.all returns a Promise
var p = Promise.all([]);
if (!(p instanceof Promise)) {
- $ERROR('Expected p to be a Promise');
+ $ERROR('Expected p to be a Promise');
}
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A2.2_T1.js b/test/built-ins/Promise/all/S25.4.4.1_A2.2_T1.js
index 8ab599632..ddeea876d 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A2.2_T1.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A2.2_T1.js
@@ -12,15 +12,15 @@ flags: [async]
var sequence = [];
-Promise.all([]).then(function() {
- sequence.push(2);
+Promise.all([]).then(function () {
+ sequence.push(2);
}).catch($DONE);
Promise.resolve().then(function() {
- sequence.push(3);
-}).then(function() {
- sequence.push(4);
- checkSequence(sequence, "Promises resolved in unexpected sequence");
+ sequence.push(3);
+}).then(function () {
+ sequence.push(4);
+ checkSequence(sequence, "Promises resolved in unexpected sequence");
}).then($DONE, $DONE);
sequence.push(1);
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A2.3_T1.js b/test/built-ins/Promise/all/S25.4.4.1_A2.3_T1.js
index 6c893b331..1b61ede66 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A2.3_T1.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A2.3_T1.js
@@ -11,8 +11,8 @@ flags: [async]
var arg = [];
-Promise.all(arg).then(function(result) {
- if (!(result instanceof Array)) {
- $ERROR("expected an array from Promise.all, got " + result);
- }
+Promise.all(arg).then(function (result) {
+ if(!(result instanceof Array)) {
+ $ERROR("expected an array from Promise.all, got " + result);
+ }
}).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A2.3_T2.js b/test/built-ins/Promise/all/S25.4.4.1_A2.3_T2.js
index 568aae475..77cd2628e 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A2.3_T2.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A2.3_T2.js
@@ -11,8 +11,8 @@ flags: [async]
var arg = [];
-Promise.all(arg).then(function(result) {
- if (result.length !== 0) {
- $ERROR("expected an empty array from Promise.all([]), got " + result);
- }
+Promise.all(arg).then(function (result) {
+ if(result.length !== 0) {
+ $ERROR("expected an empty array from Promise.all([]), got " + result);
+ }
}).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A2.3_T3.js b/test/built-ins/Promise/all/S25.4.4.1_A2.3_T3.js
index 1573e1cf2..5dc1568eb 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A2.3_T3.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A2.3_T3.js
@@ -11,8 +11,8 @@ flags: [async]
var arg = [];
-Promise.all(arg).then(function(result) {
- if (result === arg) {
- $ERROR("expected a new array from Promise.all but argument was re-used");
- }
+Promise.all(arg).then(function (result) {
+ if(result === arg) {
+ $ERROR("expected a new array from Promise.all but argument was re-used");
+ }
}).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A3.1_T1.js b/test/built-ins/Promise/all/S25.4.4.1_A3.1_T1.js
index 9c5887f28..805a05525 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A3.1_T1.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A3.1_T1.js
@@ -14,10 +14,10 @@ flags: [async]
var nonIterable = 3;
-Promise.all(nonIterable).then(function() {
- $ERROR('Promise unexpectedly resolved: Promise.all(nonIterable) should throw TypeError');
-}, function(err) {
- if (!(err instanceof TypeError)) {
- $ERROR('Expected TypeError, got ' + err);
- }
+Promise.all(nonIterable).then(function () {
+ $ERROR('Promise unexpectedly resolved: Promise.all(nonIterable) should throw TypeError');
+},function (err) {
+ if (!(err instanceof TypeError)) {
+ $ERROR('Expected TypeError, got ' + err);
+ }
}).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A3.1_T2.js b/test/built-ins/Promise/all/S25.4.4.1_A3.1_T2.js
index e838c9898..88e7acb72 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A3.1_T2.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A3.1_T2.js
@@ -13,10 +13,10 @@ description: Promise.all(new Error()) returns Promise rejected with TypeError
flags: [async]
---*/
-Promise.all(new Error("abrupt")).then(function() {
- $ERROR('Promise unexpectedly resolved: Promise.all(abruptCompletion) should throw TypeError');
-}, function(err) {
- if (!(err instanceof TypeError)) {
- $ERROR('Expected TypeError, got ' + err);
- }
-}).then($DONE, $DONE);
+Promise.all(new Error("abrupt")).then(function () {
+ $ERROR('Promise unexpectedly resolved: Promise.all(abruptCompletion) should throw TypeError');
+},function (err) {
+ if (!(err instanceof TypeError)) {
+ $ERROR('Expected TypeError, got ' + err);
+ }
+}).then($DONE,$DONE);
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A3.1_T3.js b/test/built-ins/Promise/all/S25.4.4.1_A3.1_T3.js
index 0f92a96c0..9dcabfadd 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A3.1_T3.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A3.1_T3.js
@@ -14,15 +14,15 @@ flags: [async]
var iterThrows = {};
Object.defineProperty(iterThrows, Symbol.iterator, {
- get: function() {
- throw new Error("abrupt completion");
- }
+ get: function () {
+ throw new Error("abrupt completion");
+ }
});
-Promise.all(iterThrows).then(function() {
- $ERROR('Promise unexpectedly fulfilled: Promise.all(iterThrows) should throw TypeError');
-}, function(err) {
- if (!(err instanceof Error)) {
- $ERROR('Expected promise to be rejected with error, got ' + err);
- }
-}).then($DONE, $DONE);
+Promise.all(iterThrows).then(function () {
+ $ERROR('Promise unexpectedly fulfilled: Promise.all(iterThrows) should throw TypeError');
+},function (err) {
+ if (!(err instanceof Error)) {
+ $ERROR('Expected promise to be rejected with error, got ' + err);
+ }
+}).then($DONE,$DONE);
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A4.1_T1.js b/test/built-ins/Promise/all/S25.4.4.1_A4.1_T1.js
index a594a579b..e2ad6eee7 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A4.1_T1.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A4.1_T1.js
@@ -9,7 +9,8 @@ description: this must conform to Promise constructor in Promise.all
author: Sam Mikes
---*/
-function ZeroArgConstructor() {}
+function ZeroArgConstructor() {
+}
assert.throws(TypeError, function() {
Promise.all.call(ZeroArgConstructor, []);
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A5.1_T1.js b/test/built-ins/Promise/all/S25.4.4.1_A5.1_T1.js
index 18ef595bf..2428711a6 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A5.1_T1.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A5.1_T1.js
@@ -15,15 +15,15 @@ flags: [async]
var iterThrows = {};
var error = new Test262Error();
iterThrows[Symbol.iterator] = function() {
- return {
- next: function() {
- throw error;
- }
- };
+ return {
+ next: function () {
+ throw error;
+ }
+ };
};
-Promise.all(iterThrows).then(function() {
- $ERROR('Promise unexpectedly resolved: Promise.all(iterThrows) should throw TypeError');
-}, function(reason) {
- assert.sameValue(reason, error);
-}).then($DONE, $DONE);
+Promise.all(iterThrows).then(function () {
+ $ERROR('Promise unexpectedly resolved: Promise.all(iterThrows) should throw TypeError');
+},function (reason) {
+ assert.sameValue(reason, error);
+}).then($DONE,$DONE);
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A6.1_T1.js b/test/built-ins/Promise/all/S25.4.4.1_A6.1_T1.js
index 5621dc927..a3ba1d7a8 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A6.1_T1.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A6.1_T1.js
@@ -12,5 +12,5 @@ description: Promise.all([]) produces a promise
var p = Promise.all([]);
if (!(p instanceof Promise)) {
- $ERROR('Expected Promise.all([]) to be instanceof Promise' + err);
+ $ERROR('Expected Promise.all([]) to be instanceof Promise' + err);
}
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A6.1_T2.js b/test/built-ins/Promise/all/S25.4.4.1_A6.1_T2.js
index baf2bba25..73a47330b 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A6.1_T2.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A6.1_T2.js
@@ -13,11 +13,11 @@ flags: [async]
var p = Promise.all([]);
-p.then(function(result) {
- if (!(result instanceof Array)) {
- $ERROR("Expected Promise.all([]) to be Array, actually " + result);
- }
- if (result.length !== 0) {
- $ERROR("Expected Promise.all([]) to be empty Array, actually " + result);
- }
+p.then(function (result) {
+ if (!(result instanceof Array)) {
+ $ERROR("Expected Promise.all([]) to be Array, actually " + result);
+ }
+ if (result.length !== 0) {
+ $ERROR("Expected Promise.all([]) to be empty Array, actually " + result);
+ }
}).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A7.1_T1.js b/test/built-ins/Promise/all/S25.4.4.1_A7.1_T1.js
index e8cc200f7..7eb81e9ce 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A7.1_T1.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A7.1_T1.js
@@ -15,17 +15,17 @@ var p1 = Promise.resolve(3);
var pAll = Promise.all([p1]);
-pAll.then(function(result) {
- if (!(pAll instanceof Promise)) {
- $ERROR("Expected Promise.all() to be promise, actually " + pAll);
- }
- if (!(result instanceof Array)) {
- $ERROR("Expected Promise.all() to be promise for an Array, actually " + result);
- }
- if (result.length !== 1) {
- $ERROR("Expected Promise.all([p1]) to be a promise for one-element Array, actually " + result);
- }
- if (result[0] !== 3) {
- $ERROR("Expected result[0] to be 3, actually " + result[0]);
- }
+pAll.then(function (result) {
+ if (!(pAll instanceof Promise)) {
+ $ERROR("Expected Promise.all() to be promise, actually " + pAll);
+ }
+ if (!(result instanceof Array)) {
+ $ERROR("Expected Promise.all() to be promise for an Array, actually " + result);
+ }
+ if (result.length !== 1) {
+ $ERROR("Expected Promise.all([p1]) to be a promise for one-element Array, actually " + result);
+ }
+ if (result[0] !== 3) {
+ $ERROR("Expected result[0] to be 3, actually " + result[0]);
+ }
}).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A7.2_T1.js b/test/built-ins/Promise/all/S25.4.4.1_A7.2_T1.js
index 546c47254..480147423 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A7.2_T1.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A7.2_T1.js
@@ -14,23 +14,21 @@ flags: [async]
var sequence = [];
-var p1 = new Promise(function(resolve) {
- resolve({});
-});
+var p1 = new Promise(function (resolve) { resolve({}); } );
sequence.push(1);
-Promise.all([p1]).then(function(resolved) {
- sequence.push(4);
- checkSequence(sequence, "Expected Promise.all().then to queue second");
+Promise.all([p1]).then(function (resolved) {
+ sequence.push(4);
+ checkSequence(sequence, "Expected Promise.all().then to queue second");
}).catch($DONE);
-p1.then(function() {
- sequence.push(3);
- checkSequence(sequence, "Expected p1.then to queue first");
-}).then(function() {
- sequence.push(5);
- checkSequence(sequence, "Expected final then to queue last");
+p1.then(function () {
+ sequence.push(3);
+ checkSequence(sequence, "Expected p1.then to queue first");
+}).then(function () {
+ sequence.push(5);
+ checkSequence(sequence, "Expected final then to queue last");
}).then($DONE, $DONE);
sequence.push(2);
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A8.1_T1.js b/test/built-ins/Promise/all/S25.4.4.1_A8.1_T1.js
index 4115767c5..7a6d917d0 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A8.1_T1.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A8.1_T1.js
@@ -11,28 +11,24 @@ flags: [async]
var sequence = [];
-var p1 = new Promise(function(resolve) {
- resolve(1);
-});
-var p2 = new Promise(function(resolve) {
- resolve(2);
-});
+var p1 = new Promise(function (resolve) { resolve(1); } );
+var p2 = new Promise(function (resolve) { resolve(2); } );
sequence.push(1);
-p1.then(function() {
- sequence.push(3);
- checkSequence(sequence, "Expected to be called first.");
+p1.then(function () {
+ sequence.push(3);
+ checkSequence(sequence, "Expected to be called first.");
}).catch($DONE);
-Promise.all([p1, p2]).then(function() {
- sequence.push(5);
- checkSequence(sequence, "Expected to be called third.");
+Promise.all([p1, p2]).then(function () {
+ sequence.push(5);
+ checkSequence(sequence, "Expected to be called third.");
}).then($DONE, $DONE);
-p2.then(function() {
- sequence.push(4);
- checkSequence(sequence, "Expected to be called second.");
+p2.then(function () {
+ sequence.push(4);
+ checkSequence(sequence, "Expected to be called second.");
}).catch($DONE);
sequence.push(2);
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A8.2_T1.js b/test/built-ins/Promise/all/S25.4.4.1_A8.2_T1.js
index b726f5879..77d087034 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A8.2_T1.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A8.2_T1.js
@@ -11,17 +11,17 @@ flags: [async]
---*/
var rejectP1,
- p1 = new Promise(function(resolve, reject) {
- rejectP1 = reject;
- }),
- p2 = Promise.resolve(2);
+ p1 = new Promise(function (resolve, reject) {
+ rejectP1 = reject;
+ }),
+ p2 = Promise.resolve(2);
-Promise.all([p1, p2]).then(function(resolve) {
- $ERROR("Did not expect promise to be fulfilled.");
-}, function(rejected) {
- if (rejected !== 1) {
- $ERROR("Expected promise to be rejected with 1, actually " + rejected);
- }
+Promise.all([p1, p2]).then(function (resolve) {
+ $ERROR("Did not expect promise to be fulfilled.");
+}, function (rejected) {
+ if (rejected !== 1) {
+ $ERROR("Expected promise to be rejected with 1, actually " + rejected);
+ }
}).then($DONE, $DONE);
rejectP1(1);
diff --git a/test/built-ins/Promise/all/S25.4.4.1_A8.2_T2.js b/test/built-ins/Promise/all/S25.4.4.1_A8.2_T2.js
index 128375aae..bb700ae46 100644
--- a/test/built-ins/Promise/all/S25.4.4.1_A8.2_T2.js
+++ b/test/built-ins/Promise/all/S25.4.4.1_A8.2_T2.js
@@ -11,17 +11,17 @@ flags: [async]
---*/
var rejectP2,
- p1 = Promise.resolve(1),
- p2 = new Promise(function(resolve, reject) {
- rejectP2 = reject;
- });
+ p1 = Promise.resolve(1),
+ p2 = new Promise(function (resolve, reject) {
+ rejectP2 = reject;
+ });
-Promise.all([p1, p2]).then(function() {
- $ERROR("Did not expect promise to be fulfilled.");
-}, function(rejected) {
- if (rejected !== 2) {
- $ERROR("Expected promise to be rejected with 2, actually " + rejected);
- }
+Promise.all([p1, p2]).then(function () {
+ $ERROR("Did not expect promise to be fulfilled.");
+}, function (rejected) {
+ if (rejected !== 2) {
+ $ERROR("Expected promise to be rejected with 2, actually " + rejected);
+ }
}).then($DONE, $DONE);
rejectP2(2);
diff --git a/test/built-ins/Promise/all/call-resolve-element-after-return.js b/test/built-ins/Promise/all/call-resolve-element-after-return.js
index c644abeb8..6b85ec15e 100644
--- a/test/built-ins/Promise/all/call-resolve-element-after-return.js
+++ b/test/built-ins/Promise/all/call-resolve-element-after-return.js
@@ -27,9 +27,7 @@ function Constructor(executor) {
}
executor(resolve, $ERROR);
}
-Constructor.resolve = function(v) {
- return v;
-};
+Constructor.resolve = function(v) { return v; };
var p1OnFulfilled;
diff --git a/test/built-ins/Promise/all/call-resolve-element-items.js b/test/built-ins/Promise/all/call-resolve-element-items.js
index 3cf7629a4..97e7541c3 100644
--- a/test/built-ins/Promise/all/call-resolve-element-items.js
+++ b/test/built-ins/Promise/all/call-resolve-element-items.js
@@ -26,9 +26,7 @@ function Constructor(executor) {
}
executor(resolve, $ERROR);
}
-Constructor.resolve = function(v) {
- return v;
-};
+Constructor.resolve = function(v) { return v; };
var p1 = {
then: function(onFulfilled, onRejected) {
diff --git a/test/built-ins/Promise/all/call-resolve-element.js b/test/built-ins/Promise/all/call-resolve-element.js
index 37be4b02d..fc600d459 100644
--- a/test/built-ins/Promise/all/call-resolve-element.js
+++ b/test/built-ins/Promise/all/call-resolve-element.js
@@ -25,9 +25,7 @@ function Constructor(executor) {
}
executor(resolve, $ERROR);
}
-Constructor.resolve = function(v) {
- return v;
-};
+Constructor.resolve = function(v) { return v; };
var p1 = {
then: function(onFulfilled, onRejected) {
diff --git a/test/built-ins/Promise/all/capability-executor-called-twice.js b/test/built-ins/Promise/all/capability-executor-called-twice.js
index 7f9427dbc..580483b33 100644
--- a/test/built-ins/Promise/all/capability-executor-called-twice.js
+++ b/test/built-ins/Promise/all/capability-executor-called-twice.js
@@ -27,7 +27,7 @@ Promise.all.call(function(executor) {
checkPoint += "a";
executor();
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, []);
assert.sameValue(checkPoint, "abc", "executor initially called with no arguments");
@@ -37,7 +37,7 @@ Promise.all.call(function(executor) {
checkPoint += "a";
executor(undefined, undefined);
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, []);
assert.sameValue(checkPoint, "abc", "executor initially called with (undefined, undefined)");
@@ -46,9 +46,9 @@ var checkPoint = "";
assert.throws(TypeError, function() {
Promise.all.call(function(executor) {
checkPoint += "a";
- executor(undefined, function() {});
+ executor(undefined, function(){});
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, []);
}, "executor initially called with (undefined, function)");
@@ -58,9 +58,9 @@ var checkPoint = "";
assert.throws(TypeError, function() {
Promise.all.call(function(executor) {
checkPoint += "a";
- executor(function() {}, undefined);
+ executor(function(){}, undefined);
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, []);
}, "executor initially called with (function, undefined)");
@@ -72,7 +72,7 @@ assert.throws(TypeError, function() {
checkPoint += "a";
executor("invalid value", 123);
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, []);
}, "executor initially called with (String, Number)");
diff --git a/test/built-ins/Promise/all/capability-executor-not-callable.js b/test/built-ins/Promise/all/capability-executor-not-callable.js
index db4092e66..91ed10864 100644
--- a/test/built-ins/Promise/all/capability-executor-not-callable.js
+++ b/test/built-ins/Promise/all/capability-executor-not-callable.js
@@ -56,7 +56,7 @@ var checkPoint = "";
assert.throws(TypeError, function() {
Promise.all.call(function(executor) {
checkPoint += "a";
- executor(undefined, function() {});
+ executor(undefined, function(){});
checkPoint += "b";
}, []);
}, "executor called with (undefined, function)");
@@ -66,7 +66,7 @@ var checkPoint = "";
assert.throws(TypeError, function() {
Promise.all.call(function(executor) {
checkPoint += "a";
- executor(function() {}, undefined);
+ executor(function(){}, undefined);
checkPoint += "b";
}, []);
}, "executor called with (function, undefined)");
diff --git a/test/built-ins/Promise/all/capability-resolve-throws-no-close.js b/test/built-ins/Promise/all/capability-resolve-throws-no-close.js
index 390bf8d25..9124a3a56 100644
--- a/test/built-ins/Promise/all/capability-resolve-throws-no-close.js
+++ b/test/built-ins/Promise/all/capability-resolve-throws-no-close.js
@@ -50,9 +50,7 @@ var iter = {};
iter[Symbol.iterator] = function() {
return {
next: function() {
- return {
- done: true
- };
+ return { done: true };
},
return: function() {
returnCount += 1;
@@ -62,9 +60,7 @@ iter[Symbol.iterator] = function() {
};
var P = function(executor) {
return new Promise(function(_, reject) {
- executor(function() {
- throw new Test262Error();
- }, reject);
+ executor(function() { throw new Test262Error(); }, reject);
});
};
diff --git a/test/built-ins/Promise/all/capability-resolve-throws-reject.js b/test/built-ins/Promise/all/capability-resolve-throws-reject.js
index 57f3e2755..3ad3affde 100644
--- a/test/built-ins/Promise/all/capability-resolve-throws-reject.js
+++ b/test/built-ins/Promise/all/capability-resolve-throws-reject.js
@@ -48,9 +48,7 @@ flags: [async]
var thrown = new Test262Error();
var P = function(executor) {
return new Promise(function(_, reject) {
- executor(function() {
- throw thrown;
- }, reject);
+ executor(function() { throw thrown; }, reject);
});
};
diff --git a/test/built-ins/Promise/all/does-not-invoke-array-setters.js b/test/built-ins/Promise/all/does-not-invoke-array-setters.js
index 54c332a02..19db5a8be 100644
--- a/test/built-ins/Promise/all/does-not-invoke-array-setters.js
+++ b/test/built-ins/Promise/all/does-not-invoke-array-setters.js
@@ -33,6 +33,4 @@ Object.defineProperty(Array.prototype, 0, {
}
});
-Promise.all([42]).then(function() {
- $DONE();
-}, $DONE);
+Promise.all([42]).then(function(){ $DONE(); }, $DONE);
diff --git a/test/built-ins/Promise/all/invoke-resolve-error-close.js b/test/built-ins/Promise/all/invoke-resolve-error-close.js
index aead2b647..ac2ca2824 100644
--- a/test/built-ins/Promise/all/invoke-resolve-error-close.js
+++ b/test/built-ins/Promise/all/invoke-resolve-error-close.js
@@ -30,10 +30,7 @@ var callCount = 0;
iterDoneSpy[Symbol.iterator] = function() {
return {
next: function() {
- return {
- value: null,
- done: false
- };
+ return { value: null, done: false };
},
return: function() {
callCount += 1;
diff --git a/test/built-ins/Promise/all/invoke-resolve-get-error-close.js b/test/built-ins/Promise/all/invoke-resolve-get-error-close.js
index 22e75e0df..ce43d8ab1 100644
--- a/test/built-ins/Promise/all/invoke-resolve-get-error-close.js
+++ b/test/built-ins/Promise/all/invoke-resolve-get-error-close.js
@@ -30,9 +30,7 @@ var returnCount = 0;
iter[Symbol.iterator] = function() {
return {
next: function() {
- return {
- done: false
- };
+ return { done: false };
},
return: function() {
returnCount += 1;
diff --git a/test/built-ins/Promise/all/invoke-then-error-close.js b/test/built-ins/Promise/all/invoke-then-error-close.js
index fe683d91e..6786b3188 100644
--- a/test/built-ins/Promise/all/invoke-then-error-close.js
+++ b/test/built-ins/Promise/all/invoke-then-error-close.js
@@ -31,10 +31,7 @@ var iter = {};
iter[Symbol.iterator] = function() {
return {
next: function() {
- return {
- done: false,
- value: promise
- };
+ return { done: false, value: promise };
},
return: function() {
returnCount += 1;
diff --git a/test/built-ins/Promise/all/invoke-then-get-error-close.js b/test/built-ins/Promise/all/invoke-then-get-error-close.js
index 5023c3d4f..a200b752a 100644
--- a/test/built-ins/Promise/all/invoke-then-get-error-close.js
+++ b/test/built-ins/Promise/all/invoke-then-get-error-close.js
@@ -31,10 +31,7 @@ var iter = {};
iter[Symbol.iterator] = function() {
return {
next: function() {
- return {
- done: false,
- value: promise
- };
+ return { done: false, value: promise };
},
return: function() {
returnCount += 1;
diff --git a/test/built-ins/Promise/all/new-resolve-function.js b/test/built-ins/Promise/all/new-resolve-function.js
index b4778a914..383148f44 100644
--- a/test/built-ins/Promise/all/new-resolve-function.js
+++ b/test/built-ins/Promise/all/new-resolve-function.js
@@ -15,17 +15,14 @@ info: |
...
---*/
-function resolveFunction() {}
+function resolveFunction() { }
function Constructor(executor) {
executor(resolveFunction, $ERROR);
}
-Constructor.resolve = function(v) {
- return v;
-};
+Constructor.resolve = function(v) { return v; };
-var callCount1 = 0,
- callCount2 = 0;
+var callCount1 = 0, callCount2 = 0;
var p1OnFulfilled;
var p1 = {
diff --git a/test/built-ins/Promise/all/reject-deferred.js b/test/built-ins/Promise/all/reject-deferred.js
index bd4280ec1..40d282135 100644
--- a/test/built-ins/Promise/all/reject-deferred.js
+++ b/test/built-ins/Promise/all/reject-deferred.js
@@ -25,9 +25,7 @@ flags: [async]
var thenable = {
then: function(_, reject) {
- new Promise(function(resolve) {
- resolve();
- })
+ new Promise(function(resolve) { resolve(); })
.then(function() {
reject();
});
diff --git a/test/built-ins/Promise/all/reject-ignored-deferred.js b/test/built-ins/Promise/all/reject-ignored-deferred.js
index 6303836d5..2913ba760 100644
--- a/test/built-ins/Promise/all/reject-ignored-deferred.js
+++ b/test/built-ins/Promise/all/reject-ignored-deferred.js
@@ -30,9 +30,7 @@ flags: [async]
var fulfiller = {
then: function(resolve) {
- new Promise(function(resolve) {
- resolve();
- })
+ new Promise(function(resolve) { resolve(); })
.then(function() {
resolve();
});
@@ -40,9 +38,7 @@ var fulfiller = {
};
var rejector = {
then: function(resolve, reject) {
- new Promise(function(resolve) {
- resolve();
- })
+ new Promise(function(resolve) { resolve(); })
.then(function() {
resolve();
reject();
diff --git a/test/built-ins/Promise/all/resolve-before-loop-exit-from-same.js b/test/built-ins/Promise/all/resolve-before-loop-exit-from-same.js
index 0c8d848f2..3294503da 100644
--- a/test/built-ins/Promise/all/resolve-before-loop-exit-from-same.js
+++ b/test/built-ins/Promise/all/resolve-before-loop-exit-from-same.js
@@ -39,9 +39,7 @@ function Constructor(executor) {
}
executor(resolve, $ERROR);
}
-Constructor.resolve = function(v) {
- return v;
-};
+Constructor.resolve = function(v) { return v; };
var p1OnFulfilled;
diff --git a/test/built-ins/Promise/all/resolve-before-loop-exit.js b/test/built-ins/Promise/all/resolve-before-loop-exit.js
index 3f09d3ceb..0ecb2a179 100644
--- a/test/built-ins/Promise/all/resolve-before-loop-exit.js
+++ b/test/built-ins/Promise/all/resolve-before-loop-exit.js
@@ -39,9 +39,7 @@ function Constructor(executor) {
}
executor(resolve, $ERROR);
}
-Constructor.resolve = function(v) {
- return v;
-};
+Constructor.resolve = function(v) { return v; };
var p1OnFulfilled;
diff --git a/test/built-ins/Promise/all/resolve-element-function-extensible.js b/test/built-ins/Promise/all/resolve-element-function-extensible.js
index 570222b0f..fff03cde8 100644
--- a/test/built-ins/Promise/all/resolve-element-function-extensible.js
+++ b/test/built-ins/Promise/all/resolve-element-function-extensible.js
@@ -16,13 +16,10 @@ var thenable = {
resolveElementFunction = fulfill;
}
};
-
function NotPromise(executor) {
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
}
-NotPromise.resolve = function(v) {
- return v;
-};
+NotPromise.resolve = function(v) { return v; };
Promise.all.call(NotPromise, [thenable]);
assert(Object.isExtensible(resolveElementFunction));
diff --git a/test/built-ins/Promise/all/resolve-element-function-length.js b/test/built-ins/Promise/all/resolve-element-function-length.js
index 87938eb4d..6b1570582 100644
--- a/test/built-ins/Promise/all/resolve-element-function-length.js
+++ b/test/built-ins/Promise/all/resolve-element-function-length.js
@@ -20,13 +20,10 @@ var thenable = {
resolveElementFunction = fulfill;
}
};
-
function NotPromise(executor) {
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
}
-NotPromise.resolve = function(v) {
- return v;
-};
+NotPromise.resolve = function(v) { return v; };
Promise.all.call(NotPromise, [thenable]);
assert.sameValue(resolveElementFunction.length, 1);
diff --git a/test/built-ins/Promise/all/resolve-element-function-name.js b/test/built-ins/Promise/all/resolve-element-function-name.js
index 2af12b808..f975ef3ac 100644
--- a/test/built-ins/Promise/all/resolve-element-function-name.js
+++ b/test/built-ins/Promise/all/resolve-element-function-name.js
@@ -19,13 +19,10 @@ var thenable = {
resolveElementFunction = fulfill;
}
};
-
function NotPromise(executor) {
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
}
-NotPromise.resolve = function(v) {
- return v;
-};
+NotPromise.resolve = function(v) { return v; };
Promise.all.call(NotPromise, [thenable]);
assert.sameValue(Object.prototype.hasOwnProperty.call(resolveElementFunction, "name"), false);
diff --git a/test/built-ins/Promise/all/resolve-element-function-nonconstructor.js b/test/built-ins/Promise/all/resolve-element-function-nonconstructor.js
index 7da037347..4c329a4b0 100644
--- a/test/built-ins/Promise/all/resolve-element-function-nonconstructor.js
+++ b/test/built-ins/Promise/all/resolve-element-function-nonconstructor.js
@@ -17,16 +17,11 @@ var thenable = {
resolveElementFunction = fulfill;
}
};
-
function NotPromise(executor) {
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
}
-NotPromise.resolve = function(v) {
- return v;
-};
+NotPromise.resolve = function(v) { return v; };
Promise.all.call(NotPromise, [thenable]);
assert.sameValue(Object.prototype.hasOwnProperty.call(resolveElementFunction, "prototype"), false);
-assert.throws(TypeError, function() {
- new resolveElementFunction();
-});
+assert.throws(TypeError, function() { new resolveElementFunction(); });
diff --git a/test/built-ins/Promise/all/resolve-element-function-prototype.js b/test/built-ins/Promise/all/resolve-element-function-prototype.js
index f7c66f97c..c809e78c6 100644
--- a/test/built-ins/Promise/all/resolve-element-function-prototype.js
+++ b/test/built-ins/Promise/all/resolve-element-function-prototype.js
@@ -18,13 +18,10 @@ var thenable = {
resolveElementFunction = fulfill;
}
};
-
function NotPromise(executor) {
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
}
-NotPromise.resolve = function(v) {
- return v;
-};
+NotPromise.resolve = function(v) { return v; };
Promise.all.call(NotPromise, [thenable]);
assert.sameValue(Object.getPrototypeOf(resolveElementFunction), Function.prototype);
diff --git a/test/built-ins/Promise/all/resolve-from-same-thenable.js b/test/built-ins/Promise/all/resolve-from-same-thenable.js
index 430026ff8..02cc9b982 100644
--- a/test/built-ins/Promise/all/resolve-from-same-thenable.js
+++ b/test/built-ins/Promise/all/resolve-from-same-thenable.js
@@ -39,9 +39,7 @@ function Constructor(executor) {
}
executor(resolve, $ERROR);
}
-Constructor.resolve = function(v) {
- return v;
-};
+Constructor.resolve = function(v) { return v; };
var p1OnFulfilled, p2OnFulfilled, p3OnFulfilled;
diff --git a/test/built-ins/Promise/all/resolve-poisoned-then.js b/test/built-ins/Promise/all/resolve-poisoned-then.js
index 191175a69..53de258c7 100644
--- a/test/built-ins/Promise/all/resolve-poisoned-then.js
+++ b/test/built-ins/Promise/all/resolve-poisoned-then.js
@@ -60,12 +60,12 @@ try {
}
promise.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(val) {
- if (val !== value) {
- $DONE('The promise should be rejected with the expected value.');
- return;
- }
+ $DONE('The promise should not be fulfilled.');
+ }, function(val) {
+ if (val !== value) {
+ $DONE('The promise should be rejected with the expected value.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/all/resolve-thenable.js b/test/built-ins/Promise/all/resolve-thenable.js
index 905eff387..c39de44bb 100644
--- a/test/built-ins/Promise/all/resolve-thenable.js
+++ b/test/built-ins/Promise/all/resolve-thenable.js
@@ -62,12 +62,12 @@ try {
}
promise.then(function(val) {
- if (val !== value) {
- $DONE('The promise should be resolved with the expected value.');
- return;
- }
+ if (val !== value) {
+ $DONE('The promise should be resolved with the expected value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/all/same-reject-function.js b/test/built-ins/Promise/all/same-reject-function.js
index 9c8107532..0e0db97c4 100644
--- a/test/built-ins/Promise/all/same-reject-function.js
+++ b/test/built-ins/Promise/all/same-reject-function.js
@@ -13,17 +13,14 @@ info: |
...
---*/
-function rejectFunction() {}
+function rejectFunction() { }
function Constructor(executor) {
executor($ERROR, rejectFunction);
}
-Constructor.resolve = function(v) {
- return v;
-};
+Constructor.resolve = function(v) { return v; };
-var callCount1 = 0,
- callCount2 = 0;
+var callCount1 = 0, callCount2 = 0;
var p1 = {
then: function(onFulfilled, onRejected) {
diff --git a/test/built-ins/Promise/all/species-get-error.js b/test/built-ins/Promise/all/species-get-error.js
index 43ed463d6..0311392b0 100644
--- a/test/built-ins/Promise/all/species-get-error.js
+++ b/test/built-ins/Promise/all/species-get-error.js
@@ -14,7 +14,7 @@ features: [Symbol.species]
---*/
function C(executor) {
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
}
Object.defineProperty(C, Symbol.species, {
get: function() {
diff --git a/test/built-ins/Promise/executor-function-extensible.js b/test/built-ins/Promise/executor-function-extensible.js
index 67b539538..d15764391 100644
--- a/test/built-ins/Promise/executor-function-extensible.js
+++ b/test/built-ins/Promise/executor-function-extensible.js
@@ -11,10 +11,9 @@ info: |
---*/
var executorFunction;
-
function NotPromise(executor) {
executorFunction = executor;
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
}
Promise.resolve.call(NotPromise);
diff --git a/test/built-ins/Promise/executor-function-length.js b/test/built-ins/Promise/executor-function-length.js
index 0558e97b5..01fdedcaa 100644
--- a/test/built-ins/Promise/executor-function-length.js
+++ b/test/built-ins/Promise/executor-function-length.js
@@ -15,10 +15,9 @@ includes: [propertyHelper.js]
---*/
var executorFunction;
-
function NotPromise(executor) {
executorFunction = executor;
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
}
Promise.resolve.call(NotPromise);
diff --git a/test/built-ins/Promise/executor-function-name.js b/test/built-ins/Promise/executor-function-name.js
index f571504fc..ceb4aa98d 100644
--- a/test/built-ins/Promise/executor-function-name.js
+++ b/test/built-ins/Promise/executor-function-name.js
@@ -14,10 +14,9 @@ info: |
---*/
var executorFunction;
-
function NotPromise(executor) {
executorFunction = executor;
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
}
Promise.resolve.call(NotPromise);
diff --git a/test/built-ins/Promise/executor-function-nonconstructor.js b/test/built-ins/Promise/executor-function-nonconstructor.js
index e8686c60e..53c1c4595 100644
--- a/test/built-ins/Promise/executor-function-nonconstructor.js
+++ b/test/built-ins/Promise/executor-function-nonconstructor.js
@@ -12,14 +12,11 @@ info: |
---*/
var executorFunction;
-
function NotPromise(executor) {
executorFunction = executor;
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
}
Promise.resolve.call(NotPromise);
assert.sameValue(Object.prototype.hasOwnProperty.call(executorFunction, "prototype"), false);
-assert.throws(TypeError, function() {
- new executorFunction();
-});
+assert.throws(TypeError, function() { new executorFunction(); });
diff --git a/test/built-ins/Promise/executor-function-prototype.js b/test/built-ins/Promise/executor-function-prototype.js
index c334f4f5b..83d84e46e 100644
--- a/test/built-ins/Promise/executor-function-prototype.js
+++ b/test/built-ins/Promise/executor-function-prototype.js
@@ -13,10 +13,9 @@ info: |
---*/
var executorFunction;
-
function NotPromise(executor) {
executorFunction = executor;
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
}
Promise.resolve.call(NotPromise);
diff --git a/test/built-ins/Promise/prototype/S25.4.4.2_A1.1_T1.js b/test/built-ins/Promise/prototype/S25.4.4.2_A1.1_T1.js
index 139ed3a1b..2ac312176 100644
--- a/test/built-ins/Promise/prototype/S25.4.4.2_A1.1_T1.js
+++ b/test/built-ins/Promise/prototype/S25.4.4.2_A1.1_T1.js
@@ -11,5 +11,5 @@ description: Promise prototype exists
---*/
if (Promise.prototype === undefined) {
- $ERROR("Expected Promise.prototype to be defined.");
+ $ERROR("Expected Promise.prototype to be defined.");
}
diff --git a/test/built-ins/Promise/prototype/S25.4.5_A3.1_T1.js b/test/built-ins/Promise/prototype/S25.4.5_A3.1_T1.js
index 23e3452d8..c8719d738 100644
--- a/test/built-ins/Promise/prototype/S25.4.5_A3.1_T1.js
+++ b/test/built-ins/Promise/prototype/S25.4.5_A3.1_T1.js
@@ -10,5 +10,6 @@ description: Promise.prototype.constructor is the Promise constructor
---*/
if (Promise.prototype.constructor !== Promise) {
- $ERROR("Expected Promise.prototype.constructor to be Promise");
+ $ERROR("Expected Promise.prototype.constructor to be Promise");
}
+
diff --git a/test/built-ins/Promise/prototype/catch/S25.4.5.1_A1.1_T1.js b/test/built-ins/Promise/prototype/catch/S25.4.5.1_A1.1_T1.js
index 958bb552e..abd62d615 100644
--- a/test/built-ins/Promise/prototype/catch/S25.4.5.1_A1.1_T1.js
+++ b/test/built-ins/Promise/prototype/catch/S25.4.5.1_A1.1_T1.js
@@ -10,5 +10,5 @@ description: Promise.prototype.catch is a function
---*/
if (!(Promise.prototype.catch instanceof Function)) {
- $ERROR("Expected Promise.prototype.catch to be a function");
+ $ERROR("Expected Promise.prototype.catch to be a function");
}
diff --git a/test/built-ins/Promise/prototype/catch/S25.4.5.1_A2.1_T1.js b/test/built-ins/Promise/prototype/catch/S25.4.5.1_A2.1_T1.js
index 20e81c5ac..1dfed96c3 100644
--- a/test/built-ins/Promise/prototype/catch/S25.4.5.1_A2.1_T1.js
+++ b/test/built-ins/Promise/prototype/catch/S25.4.5.1_A2.1_T1.js
@@ -12,5 +12,5 @@ description: catch is a method on a Promise
var p = Promise.resolve(3);
if (!(p.catch instanceof Function)) {
- $ERROR("Expected p.catch to be a function");
+ $ERROR("Expected p.catch to be a function");
}
diff --git a/test/built-ins/Promise/prototype/catch/S25.4.5.1_A3.1_T1.js b/test/built-ins/Promise/prototype/catch/S25.4.5.1_A3.1_T1.js
index 6606fdcdc..a13171c31 100644
--- a/test/built-ins/Promise/prototype/catch/S25.4.5.1_A3.1_T1.js
+++ b/test/built-ins/Promise/prototype/catch/S25.4.5.1_A3.1_T1.js
@@ -14,10 +14,11 @@ var obj = {};
var p = Promise.resolve(obj);
-p.catch(function() {
- $ERROR("Should not be called - promise is fulfilled");
-}).then(function(arg) {
- if (arg !== obj) {
- $ERROR("Expected promise to be fulfilled with obj, got " + arg);
- }
+p.catch(function () {
+ $ERROR("Should not be called - promise is fulfilled");
+}).then(function (arg) {
+ if (arg !== obj) {
+ $ERROR("Expected promise to be fulfilled with obj, got " + arg);
+ }
}).then($DONE, $DONE);
+
diff --git a/test/built-ins/Promise/prototype/catch/S25.4.5.1_A3.1_T2.js b/test/built-ins/Promise/prototype/catch/S25.4.5.1_A3.1_T2.js
index e0194fc4a..b04fbf630 100644
--- a/test/built-ins/Promise/prototype/catch/S25.4.5.1_A3.1_T2.js
+++ b/test/built-ins/Promise/prototype/catch/S25.4.5.1_A3.1_T2.js
@@ -14,10 +14,11 @@ var obj = {};
var p = Promise.reject(obj);
-p.then(function() {
- $ERROR("Should not be called: did not expect promise to be fulfilled");
-}).catch(function(arg) {
- if (arg !== obj) {
- $ERROR("Should have been rejected with reason obj, got " + arg);
- }
+p.then(function () {
+ $ERROR("Should not be called: did not expect promise to be fulfilled");
+}).catch(function (arg) {
+ if (arg !== obj) {
+ $ERROR("Should have been rejected with reason obj, got " + arg);
+ }
}).then($DONE, $DONE);
+
diff --git a/test/built-ins/Promise/prototype/catch/this-value-obj-coercible.js b/test/built-ins/Promise/prototype/catch/this-value-obj-coercible.js
index 70f9f418a..905dd966a 100644
--- a/test/built-ins/Promise/prototype/catch/this-value-obj-coercible.js
+++ b/test/built-ins/Promise/prototype/catch/this-value-obj-coercible.js
@@ -24,29 +24,21 @@ features: [Symbol]
---*/
var booleanCount = 0;
-Boolean.prototype.then = function() {
- booleanCount += 1;
-};
+Boolean.prototype.then = function() { booleanCount += 1; };
Promise.prototype.catch.call(true);
assert.sameValue(booleanCount, 1, 'boolean');
var numberCount = 0;
-Number.prototype.then = function() {
- numberCount += 1;
-};
+Number.prototype.then = function() { numberCount += 1; };
Promise.prototype.catch.call(34);
assert.sameValue(numberCount, 1, 'number');
var stringCount = 0;
-String.prototype.then = function() {
- stringCount += 1;
-};
+String.prototype.then = function() { stringCount += 1; };
Promise.prototype.catch.call('');
assert.sameValue(stringCount, 1, 'string');
var symbolCount = 0;
-Symbol.prototype.then = function() {
- symbolCount += 1;
-};
+Symbol.prototype.then = function() { symbolCount += 1; };
Promise.prototype.catch.call(Symbol());
assert.sameValue(symbolCount, 1, 'symbol');
diff --git a/test/built-ins/Promise/prototype/catch/this-value-then-not-callable.js b/test/built-ins/Promise/prototype/catch/this-value-then-not-callable.js
index 20c29cfe6..1feffa35b 100644
--- a/test/built-ins/Promise/prototype/catch/this-value-then-not-callable.js
+++ b/test/built-ins/Promise/prototype/catch/this-value-then-not-callable.js
@@ -38,37 +38,25 @@ assert.throws(TypeError, function() {
}, 'undefined');
assert.throws(TypeError, function() {
- Promise.prototype.catch.call({
- then: null
- });
+ Promise.prototype.catch.call({ then: null });
}, 'null');
assert.throws(TypeError, function() {
- Promise.prototype.catch.call({
- then: 1
- });
+ Promise.prototype.catch.call({ then: 1 });
}, 'number');
assert.throws(TypeError, function() {
- Promise.prototype.catch.call({
- then: ''
- });
+ Promise.prototype.catch.call({ then: '' });
}, 'string');
assert.throws(TypeError, function() {
- Promise.prototype.catch.call({
- then: true
- });
+ Promise.prototype.catch.call({ then: true });
}, 'boolean');
assert.throws(TypeError, function() {
- Promise.prototype.catch.call({
- then: symbol
- });
+ Promise.prototype.catch.call({ then: symbol });
}, 'symbol');
assert.throws(TypeError, function() {
- Promise.prototype.catch.call({
- then: {}
- });
+ Promise.prototype.catch.call({ then: {} });
}, 'ordinary object');
diff --git a/test/built-ins/Promise/prototype/finally/invokes-then-with-function.js b/test/built-ins/Promise/prototype/finally/invokes-then-with-function.js
index 697bea0b3..648b7dd6f 100644
--- a/test/built-ins/Promise/prototype/finally/invokes-then-with-function.js
+++ b/test/built-ins/Promise/prototype/finally/invokes-then-with-function.js
@@ -7,7 +7,7 @@ esid: sec-promise.prototype.finally
features: [Promise.prototype.finally]
---*/
-var target = new Promise(function() {});
+var target = new Promise(function () {});
var returnValue = {};
var callCount = 0;
var thisValue = null;
@@ -26,8 +26,8 @@ target.then = function(a, b) {
return returnValue;
};
-var originalFinallyHandler = function() {};
-var anonName = Object(function() {}).name;
+var originalFinallyHandler = function () {};
+var anonName = Object(function () {}).name;
var result = Promise.prototype.finally.call(target, originalFinallyHandler, 2, 3);
diff --git a/test/built-ins/Promise/prototype/finally/invokes-then-with-non-function.js b/test/built-ins/Promise/prototype/finally/invokes-then-with-non-function.js
index b8e57281c..1193119fb 100644
--- a/test/built-ins/Promise/prototype/finally/invokes-then-with-non-function.js
+++ b/test/built-ins/Promise/prototype/finally/invokes-then-with-non-function.js
@@ -7,7 +7,7 @@ esid: sec-promise.prototype.finally
features: [Promise.prototype.finally]
---*/
-var target = new Promise(function() {});
+var target = new Promise(function () {});
var returnValue = {};
var callCount = 0;
var thisValue = null;
diff --git a/test/built-ins/Promise/prototype/finally/rejected-observable-then-calls.js b/test/built-ins/Promise/prototype/finally/rejected-observable-then-calls.js
index ed75b1687..794677b57 100644
--- a/test/built-ins/Promise/prototype/finally/rejected-observable-then-calls.js
+++ b/test/built-ins/Promise/prototype/finally/rejected-observable-then-calls.js
@@ -11,29 +11,29 @@ includes: [promiseHelper.js]
var sequence = [];
var noReason = {};
var no = Promise.reject(noReason);
-no.then = function() {
+no.then = function () {
sequence.push(1);
return Promise.prototype.then.apply(this, arguments);
};
var yesValue = {};
var yes = Promise.resolve(yesValue);
-yes.then = function() {
+yes.then = function () {
sequence.push(4);
return Promise.prototype.then.apply(this, arguments);
};
-no.catch(function(e) {
+no.catch(function (e) {
sequence.push(2);
assert.sameValue(e, noReason);
throw e;
-}).finally(function() {
+}).finally(function () {
sequence.push(3);
return yes;
-}).catch(function(e) {
+}).catch(function (e) {
sequence.push(5);
assert.sameValue(e, noReason);
-}).then(function() {
+}).then(function () {
checkSequence(sequence, "All expected callbacks called in correct order");
$DONE();
}).catch($ERROR);
diff --git a/test/built-ins/Promise/prototype/finally/rejection-reason-override-with-throw.js b/test/built-ins/Promise/prototype/finally/rejection-reason-override-with-throw.js
index 1390a523f..eb82103da 100644
--- a/test/built-ins/Promise/prototype/finally/rejection-reason-override-with-throw.js
+++ b/test/built-ins/Promise/prototype/finally/rejection-reason-override-with-throw.js
@@ -14,13 +14,13 @@ var thrown = {};
var p = Promise.reject(original);
-p.finally(function() {
+p.finally(function () {
sequence.push(1);
assert.sameValue(arguments.length, 0, 'onFinally receives zero args');
throw thrown;
-}).then(function() {
+}).then(function () {
$ERROR('promise is rejected; onFulfill should not be called');
-}).catch(function(reason) {
+}).catch(function (reason) {
sequence.push(2);
assert.sameValue(reason, thrown, 'onFinally can override the rejection reason by throwing');
}).then(function() {
diff --git a/test/built-ins/Promise/prototype/finally/resolution-value-no-override.js b/test/built-ins/Promise/prototype/finally/resolution-value-no-override.js
index 02e539b6f..262f1be84 100644
--- a/test/built-ins/Promise/prototype/finally/resolution-value-no-override.js
+++ b/test/built-ins/Promise/prototype/finally/resolution-value-no-override.js
@@ -12,11 +12,11 @@ var sequence = [];
var obj = {};
var p = Promise.resolve(obj);
-p.finally(function() {
+p.finally(function () {
sequence.push(1);
assert.sameValue(arguments.length, 0, 'onFinally receives zero args');
return {};
-}).then(function(x) {
+}).then(function (x) {
sequence.push(2);
assert.sameValue(x, obj, 'onFinally can not override the resolution value');
}).then(function() {
diff --git a/test/built-ins/Promise/prototype/finally/resolved-observable-then-calls.js b/test/built-ins/Promise/prototype/finally/resolved-observable-then-calls.js
index 1fb248ac9..6e583527c 100644
--- a/test/built-ins/Promise/prototype/finally/resolved-observable-then-calls.js
+++ b/test/built-ins/Promise/prototype/finally/resolved-observable-then-calls.js
@@ -11,29 +11,30 @@ includes: [promiseHelper.js]
var sequence = [];
var yesValue = {};
var yes = Promise.resolve(yesValue);
-yes.then = function() {
+yes.then = function () {
sequence.push(1);
return Promise.prototype.then.apply(this, arguments);
};
var noReason = {};
var no = Promise.reject(noReason);
-no.then = function() {
+no.then = function () {
sequence.push(4);
return Promise.prototype.then.apply(this, arguments);
};
-yes.then(function(x) {
+yes.then(function (x) {
sequence.push(2);
assert.sameValue(x, yesValue);
return x;
-}).finally(function() {
+}).finally(function () {
sequence.push(3);
return no;
-}).catch(function(e) {
+}).catch(function (e) {
sequence.push(5);
assert.sameValue(e, noReason);
-}).then(function() {
+}).then(function () {
checkSequence(sequence, "All expected callbacks called in correct order");
$DONE();
}).catch($ERROR);
+
diff --git a/test/built-ins/Promise/prototype/finally/species-symbol.js b/test/built-ins/Promise/prototype/finally/species-symbol.js
index 0a8de6365..15a8eac64 100644
--- a/test/built-ins/Promise/prototype/finally/species-symbol.js
+++ b/test/built-ins/Promise/prototype/finally/species-symbol.js
@@ -9,14 +9,12 @@ features: [Promise.prototype.finally]
class MyPromise extends Promise {
- static get[Symbol.species]() {
- return Promise;
- }
+ static get [Symbol.species]() { return Promise; }
}
var p = Promise
- .resolve()
- .finally(() => MyPromise.resolve());
+ .resolve()
+ .finally(() => MyPromise.resolve());
assert.sameValue(p instanceof Promise, true);
assert.sameValue(p instanceof MyPromise, false);
diff --git a/test/built-ins/Promise/prototype/finally/subclass-species-constructor-reject-count.js b/test/built-ins/Promise/prototype/finally/subclass-species-constructor-reject-count.js
index ca812c499..5db1a5f49 100644
--- a/test/built-ins/Promise/prototype/finally/subclass-species-constructor-reject-count.js
+++ b/test/built-ins/Promise/prototype/finally/subclass-species-constructor-reject-count.js
@@ -8,9 +8,7 @@ features: [Promise.prototype.finally]
---*/
class FooPromise extends Promise {
- static get[Symbol.species]() {
- return Promise;
- }
+ static get [Symbol.species]() { return Promise; }
}
var p = Promise.reject().finally(() => FooPromise.reject());
diff --git a/test/built-ins/Promise/prototype/finally/subclass-species-constructor-resolve-count.js b/test/built-ins/Promise/prototype/finally/subclass-species-constructor-resolve-count.js
index 8e80ab43d..db1b151cd 100644
--- a/test/built-ins/Promise/prototype/finally/subclass-species-constructor-resolve-count.js
+++ b/test/built-ins/Promise/prototype/finally/subclass-species-constructor-resolve-count.js
@@ -8,9 +8,7 @@ features: [Promise.prototype.finally]
---*/
class FooPromise extends Promise {
- static get[Symbol.species]() {
- return Promise;
- }
+ static get [Symbol.species]() { return Promise; }
}
var p = Promise.resolve().finally(() => FooPromise.resolve());
diff --git a/test/built-ins/Promise/prototype/finally/this-value-non-promise.js b/test/built-ins/Promise/prototype/finally/this-value-non-promise.js
index 6bed146e0..16d9f8d76 100644
--- a/test/built-ins/Promise/prototype/finally/this-value-non-promise.js
+++ b/test/built-ins/Promise/prototype/finally/this-value-non-promise.js
@@ -11,9 +11,7 @@ features: [Promise.prototype.finally]
var called = false;
var p = new Proxy(Promise.resolve(), {});
var oldThen = Promise.prototype.then;
-Promise.prototype.then = () => {
- called = true;
-};
+Promise.prototype.then = () => { called = true; };
Promise.prototype.finally.call(p);
assert.sameValue(called, true);
Promise.prototype.then = oldThen;
diff --git a/test/built-ins/Promise/prototype/finally/this-value-then-not-callable.js b/test/built-ins/Promise/prototype/finally/this-value-then-not-callable.js
index 253e22fe3..cdeccdadd 100644
--- a/test/built-ins/Promise/prototype/finally/this-value-then-not-callable.js
+++ b/test/built-ins/Promise/prototype/finally/this-value-then-not-callable.js
@@ -11,11 +11,9 @@ features: [Symbol, Promise.prototype.finally]
var symbol = Symbol();
-var thrower = function() {
- throw new Test262Error('this should never happen');
-};
+var thrower = function () { throw new Test262Error('this should never happen'); };
-var p = new Promise(function() {});
+var p = new Promise(function () {});
p.then = undefined;
assert.throws(TypeError, function() {
diff --git a/test/built-ins/Promise/prototype/finally/this-value-then-poisoned.js b/test/built-ins/Promise/prototype/finally/this-value-then-poisoned.js
index 99e124db0..d8afd2612 100644
--- a/test/built-ins/Promise/prototype/finally/this-value-then-poisoned.js
+++ b/test/built-ins/Promise/prototype/finally/this-value-then-poisoned.js
@@ -9,7 +9,7 @@ esid: sec-promise.prototype.finally
features: [Promise.prototype.finally]
---*/
-var poisonedThen = Object.defineProperty(new Promise(function() {}), 'then', {
+var poisonedThen = Object.defineProperty(new Promise(function () {}), 'then', {
get: function() {
throw new Test262Error();
}
diff --git a/test/built-ins/Promise/prototype/finally/this-value-then-throws.js b/test/built-ins/Promise/prototype/finally/this-value-then-throws.js
index e8603f88e..7fff8d51a 100644
--- a/test/built-ins/Promise/prototype/finally/this-value-then-throws.js
+++ b/test/built-ins/Promise/prototype/finally/this-value-then-throws.js
@@ -9,7 +9,7 @@ esid: sec-promise.prototype.finally
features: [Promise.prototype.finally]
---*/
-var thrower = new Promise(function() {});
+var thrower = new Promise(function () {});
thrower.then = function() {
throw new Test262Error();
};
diff --git a/test/built-ins/Promise/prototype/then/S25.4.4_A1.1_T1.js b/test/built-ins/Promise/prototype/then/S25.4.4_A1.1_T1.js
index 78aa38e01..fd1519766 100644
--- a/test/built-ins/Promise/prototype/then/S25.4.4_A1.1_T1.js
+++ b/test/built-ins/Promise/prototype/then/S25.4.4_A1.1_T1.js
@@ -14,27 +14,27 @@ flags: [async]
var sequence = [];
-var p = new Promise(function(resolve, reject) {
- sequence.push(1);
- resolve("");
+var p = new Promise(function(resolve, reject){
+ sequence.push(1);
+ resolve("");
});
-p.then(function() {
- sequence.push(3);
-}).then(function() {
- sequence.push(5);
-}).then(function() {
- sequence.push(7);
+p.then(function () {
+ sequence.push(3);
+}).then(function () {
+ sequence.push(5);
+}).then(function () {
+ sequence.push(7);
});
-p.then(function() {
- sequence.push(4);
-}).then(function() {
- sequence.push(6);
-}).then(function() {
- sequence.push(8);
-}).then(function() {
- checkSequence(sequence, "Sequence should be as expected");
+p.then(function () {
+ sequence.push(4);
+}).then(function () {
+ sequence.push(6);
+}).then(function () {
+ sequence.push(8);
+}).then(function () {
+ checkSequence(sequence, "Sequence should be as expected");
}).then($DONE, $DONE);
sequence.push(2);
diff --git a/test/built-ins/Promise/prototype/then/S25.4.4_A2.1_T1.js b/test/built-ins/Promise/prototype/then/S25.4.4_A2.1_T1.js
index 971c411f9..cb02aa58a 100644
--- a/test/built-ins/Promise/prototype/then/S25.4.4_A2.1_T1.js
+++ b/test/built-ins/Promise/prototype/then/S25.4.4_A2.1_T1.js
@@ -15,18 +15,18 @@ flags: [async]
var resolveP1, rejectP2, sequence = [];
-(new Promise(function(resolve, reject) {
- resolveP1 = resolve;
-})).then(function(msg) {
- sequence.push(msg);
-}).then(function() {
- checkSequence(sequence, "Expected 1,2,3");
+(new Promise(function (resolve, reject) {
+ resolveP1 = resolve;
+})).then(function (msg) {
+ sequence.push(msg);
+}).then(function () {
+ checkSequence(sequence, "Expected 1,2,3");
}).then($DONE, $DONE);
-(new Promise(function(resolve, reject) {
- rejectP2 = reject;
-})).catch(function(msg) {
- sequence.push(msg);
+(new Promise(function (resolve, reject) {
+ rejectP2 = reject;
+})).catch(function (msg) {
+ sequence.push(msg);
});
rejectP2(2);
diff --git a/test/built-ins/Promise/prototype/then/S25.4.4_A2.1_T2.js b/test/built-ins/Promise/prototype/then/S25.4.4_A2.1_T2.js
index 4f02681ab..5c099d775 100644
--- a/test/built-ins/Promise/prototype/then/S25.4.4_A2.1_T2.js
+++ b/test/built-ins/Promise/prototype/then/S25.4.4_A2.1_T2.js
@@ -14,26 +14,26 @@ flags: [async]
---*/
var resolveP1, rejectP2, p1, p2,
- sequence = [];
+ sequence = [];
-p1 = new Promise(function(resolve, reject) {
- resolveP1 = resolve;
+p1 = new Promise(function (resolve, reject) {
+ resolveP1 = resolve;
});
-p2 = new Promise(function(resolve, reject) {
- rejectP2 = reject;
+p2 = new Promise(function (resolve, reject) {
+ rejectP2 = reject;
});
rejectP2(3);
resolveP1(2);
-p1.then(function(msg) {
- sequence.push(msg);
+p1.then(function (msg) {
+ sequence.push(msg);
});
-p2.catch(function(msg) {
- sequence.push(msg);
-}).then(function() {
- checkSequence(sequence, "Expected 1,2,3");
+p2.catch(function (msg) {
+ sequence.push(msg);
+}).then(function () {
+ checkSequence(sequence, "Expected 1,2,3");
}).then($DONE, $DONE);
sequence.push(1);
diff --git a/test/built-ins/Promise/prototype/then/S25.4.4_A2.1_T3.js b/test/built-ins/Promise/prototype/then/S25.4.4_A2.1_T3.js
index 1208cdb89..1b430f281 100644
--- a/test/built-ins/Promise/prototype/then/S25.4.4_A2.1_T3.js
+++ b/test/built-ins/Promise/prototype/then/S25.4.4_A2.1_T3.js
@@ -14,28 +14,30 @@ flags: [async]
---*/
var resolveP1, rejectP2, p1, p2,
- sequence = [];
+ sequence = [];
-p1 = new Promise(function(resolve, reject) {
- resolveP1 = resolve;
+p1 = new Promise(function (resolve, reject) {
+ resolveP1 = resolve;
});
-p2 = new Promise(function(resolve, reject) {
- rejectP2 = reject;
+p2 = new Promise(function (resolve, reject) {
+ rejectP2 = reject;
});
rejectP2(3);
resolveP1(2);
-Promise.resolve().then(function() {
- p1.then(function(msg) {
- sequence.push(msg);
- });
+Promise.resolve().then(function () {
+ p1.then(function (msg) {
+ sequence.push(msg);
+ });
- p2.catch(function(msg) {
- sequence.push(msg);
- }).then(function() {
- checkSequence(sequence, "Expected 1,2,3");
- }).then($DONE, $DONE);
+ p2.catch(function (msg) {
+ sequence.push(msg);
+ }).then(function () {
+ checkSequence(sequence, "Expected 1,2,3");
+ }).then($DONE, $DONE);
});
sequence.push(1);
+
+
diff --git a/test/built-ins/Promise/prototype/then/S25.4.5.3_A1.1_T1.js b/test/built-ins/Promise/prototype/then/S25.4.5.3_A1.1_T1.js
index f7ce622d9..79d7906b5 100644
--- a/test/built-ins/Promise/prototype/then/S25.4.5.3_A1.1_T1.js
+++ b/test/built-ins/Promise/prototype/then/S25.4.5.3_A1.1_T1.js
@@ -10,5 +10,5 @@ description: Promise.prototype.then is a function of two arguments
---*/
if (!(Promise.prototype.then instanceof Function)) {
- $ERROR("Expected Promise.prototype.then to be a function");
+ $ERROR("Expected Promise.prototype.then to be a function");
}
diff --git a/test/built-ins/Promise/prototype/then/S25.4.5.3_A1.1_T2.js b/test/built-ins/Promise/prototype/then/S25.4.5.3_A1.1_T2.js
index 0d07a720b..b22c332d4 100644
--- a/test/built-ins/Promise/prototype/then/S25.4.5.3_A1.1_T2.js
+++ b/test/built-ins/Promise/prototype/then/S25.4.5.3_A1.1_T2.js
@@ -9,12 +9,14 @@ author: Sam Mikes
description: Promise.prototype.then is a function of two arguments
---*/
-var p = new Promise(function() {});
+var p = new Promise(function () {});
if (!(p.then instanceof Function)) {
- $ERROR("Expected p.then to be a function");
+ $ERROR("Expected p.then to be a function");
}
if (p.then.length !== 2) {
- $ERROR("Expected p.then to be a function of two arguments");
+ $ERROR("Expected p.then to be a function of two arguments");
}
+
+
diff --git a/test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T1.js b/test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T1.js
index 723ff6aac..b05925ef5 100644
--- a/test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T1.js
+++ b/test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T1.js
@@ -9,8 +9,8 @@ author: Sam Mikes
description: Promise.prototype.then throw if 'this' is non-Object
---*/
-var p = new Promise(function() {});
+var p = new Promise(function () {});
assert.throws(TypeError, function() {
- p.then.call(3, function() {}, function() {});
+ p.then.call(3, function () {}, function () {});
});
diff --git a/test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T2.js b/test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T2.js
index 13b4bf050..bcaa7e48d 100644
--- a/test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T2.js
+++ b/test/built-ins/Promise/prototype/then/S25.4.5.3_A2.1_T2.js
@@ -9,10 +9,11 @@ author: Sam Mikes
description: Promise.prototype.then throw if 'this' is non-Promise Object
---*/
-function ZeroArgConstructor() {}
+function ZeroArgConstructor() {
+}
var z = new ZeroArgConstructor();
assert.throws(TypeError, function() {
- Promise.then.call(z, function() {}, function() {});
+ Promise.then.call(z, function () {}, function () {});
});
diff --git a/test/built-ins/Promise/prototype/then/S25.4.5.3_A4.1_T1.js b/test/built-ins/Promise/prototype/then/S25.4.5.3_A4.1_T1.js
index 244c9105b..ee43a0a4a 100644
--- a/test/built-ins/Promise/prototype/then/S25.4.5.3_A4.1_T1.js
+++ b/test/built-ins/Promise/prototype/then/S25.4.5.3_A4.1_T1.js
@@ -15,8 +15,8 @@ var obj = {};
var p = Promise.resolve(obj);
p.then(undefined, undefined)
- .then(function(arg) {
- if (arg !== obj) {
- $ERROR("Expected resolution object to be passed through, got " + arg);
- }
- }).then($DONE, $DONE);
+ .then(function (arg) {
+ if (arg !== obj) {
+ $ERROR("Expected resolution object to be passed through, got " + arg);
+ }
+ }).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/prototype/then/S25.4.5.3_A4.1_T2.js b/test/built-ins/Promise/prototype/then/S25.4.5.3_A4.1_T2.js
index 5a8bf136e..2032211c2 100644
--- a/test/built-ins/Promise/prototype/then/S25.4.5.3_A4.1_T2.js
+++ b/test/built-ins/Promise/prototype/then/S25.4.5.3_A4.1_T2.js
@@ -14,10 +14,10 @@ flags: [async]
var obj = {};
var p = Promise.reject(obj);
-p.then(undefined, undefined).then(function() {
- $ERROR("Should not be called -- promise was rejected.");
-}, function(arg) {
- if (arg !== obj) {
- $ERROR("Expected resolution object to be passed through, got " + arg);
- }
-}).then($DONE, $DONE);
+p.then(undefined, undefined).then(function () {
+ $ERROR("Should not be called -- promise was rejected.");
+}, function (arg) {
+ if (arg !== obj) {
+ $ERROR("Expected resolution object to be passed through, got " + arg);
+ }
+ }).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/prototype/then/S25.4.5.3_A4.2_T1.js b/test/built-ins/Promise/prototype/then/S25.4.5.3_A4.2_T1.js
index a4198cde0..eecbe9af8 100644
--- a/test/built-ins/Promise/prototype/then/S25.4.5.3_A4.2_T1.js
+++ b/test/built-ins/Promise/prototype/then/S25.4.5.3_A4.2_T1.js
@@ -15,8 +15,8 @@ var obj = {};
var p = Promise.resolve(obj);
p.then(3, 5)
- .then(function(arg) {
- if (arg !== obj) {
- $ERROR("Expected resolution object to be passed through, got " + arg);
- }
- }).then($DONE, $DONE);
+ .then(function (arg) {
+ if (arg !== obj) {
+ $ERROR("Expected resolution object to be passed through, got " + arg);
+ }
+ }).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/prototype/then/S25.4.5.3_A4.2_T2.js b/test/built-ins/Promise/prototype/then/S25.4.5.3_A4.2_T2.js
index b802575c5..e4b503df0 100644
--- a/test/built-ins/Promise/prototype/then/S25.4.5.3_A4.2_T2.js
+++ b/test/built-ins/Promise/prototype/then/S25.4.5.3_A4.2_T2.js
@@ -14,10 +14,10 @@ flags: [async]
var obj = {};
var p = Promise.reject(obj);
-p.then(3, 5).then(function() {
- $ERROR("Should not be called -- promise was rejected.");
-}, function(arg) {
- if (arg !== obj) {
- $ERROR("Expected resolution object to be passed through, got " + arg);
- }
+p.then(3, 5).then(function () {
+ $ERROR("Should not be called -- promise was rejected.");
+}, function (arg) {
+ if (arg !== obj) {
+ $ERROR("Expected resolution object to be passed through, got " + arg);
+ }
}).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/prototype/then/S25.4.5.3_A5.1_T1.js b/test/built-ins/Promise/prototype/then/S25.4.5.3_A5.1_T1.js
index 51fd71dad..7a9f02a5e 100644
--- a/test/built-ins/Promise/prototype/then/S25.4.5.3_A5.1_T1.js
+++ b/test/built-ins/Promise/prototype/then/S25.4.5.3_A5.1_T1.js
@@ -13,27 +13,27 @@ flags: [async]
---*/
var sequence = [],
- pResolve,
- p = new Promise(function(resolve, reject) {
- pResolve = resolve;
- });
+ pResolve,
+ p = new Promise(function (resolve, reject) {
+ pResolve = resolve;
+ });
sequence.push(1);
-p.then(function() {
- sequence.push(3);
- checkSequence(sequence, "Should be second");
+p.then(function () {
+ sequence.push(3);
+ checkSequence(sequence, "Should be second");
}).catch($DONE);
-Promise.resolve().then(function() {
- // enqueue another then-handler
- p.then(function() {
- sequence.push(4);
- checkSequence(sequence, "Should be third");
- }).then($DONE, $DONE);
+Promise.resolve().then(function () {
+ // enqueue another then-handler
+ p.then(function () {
+ sequence.push(4);
+ checkSequence(sequence, "Should be third");
+ }).then($DONE, $DONE);
- sequence.push(2);
- checkSequence(sequence, "Should be first");
+ sequence.push(2);
+ checkSequence(sequence, "Should be first");
- pResolve();
+ pResolve();
}).catch($DONE);
diff --git a/test/built-ins/Promise/prototype/then/S25.4.5.3_A5.2_T1.js b/test/built-ins/Promise/prototype/then/S25.4.5.3_A5.2_T1.js
index 4b4d801e0..fdf1105bc 100644
--- a/test/built-ins/Promise/prototype/then/S25.4.5.3_A5.2_T1.js
+++ b/test/built-ins/Promise/prototype/then/S25.4.5.3_A5.2_T1.js
@@ -13,29 +13,29 @@ flags: [async]
---*/
var sequence = [],
- pResolve,
- p = new Promise(function(resolve, reject) {
- pResolve = resolve;
- });
+ pResolve,
+ p = new Promise(function (resolve, reject) {
+ pResolve = resolve;
+ });
sequence.push(1);
pResolve();
-p.then(function() {
- sequence.push(3);
- checkSequence(sequence, "Should be first");
+p.then(function () {
+ sequence.push(3);
+ checkSequence(sequence, "Should be first");
}).catch($DONE);
-Promise.resolve().then(function() {
- // enqueue another then-handler
- p.then(function() {
- sequence.push(5);
- checkSequence(sequence, "Should be third");
- }).then($DONE, $DONE);
+Promise.resolve().then(function () {
+ // enqueue another then-handler
+ p.then(function () {
+ sequence.push(5);
+ checkSequence(sequence, "Should be third");
+ }).then($DONE, $DONE);
- sequence.push(4);
- checkSequence(sequence, "Should be second");
+ sequence.push(4);
+ checkSequence(sequence, "Should be second");
}).catch($DONE);
sequence.push(2);
diff --git a/test/built-ins/Promise/prototype/then/S25.4.5.3_A5.3_T1.js b/test/built-ins/Promise/prototype/then/S25.4.5.3_A5.3_T1.js
index 1455350ad..7af732e0b 100644
--- a/test/built-ins/Promise/prototype/then/S25.4.5.3_A5.3_T1.js
+++ b/test/built-ins/Promise/prototype/then/S25.4.5.3_A5.3_T1.js
@@ -13,33 +13,33 @@ flags: [async]
---*/
var sequence = [],
- pReject,
- p = new Promise(function(resolve, reject) {
- pReject = reject;
- });
+ pReject,
+ p = new Promise(function (resolve, reject) {
+ pReject = reject;
+ });
sequence.push(1);
pReject();
-p.then(function() {
- $ERROR("Should not be called -- Promise rejected.");
-}, function() {
- sequence.push(3);
- checkSequence(sequence, "Should be first");
+p.then(function () {
+ $ERROR("Should not be called -- Promise rejected.");
+}, function () {
+ sequence.push(3);
+ checkSequence(sequence, "Should be first");
}).catch($DONE);
-Promise.resolve().then(function() {
- // enqueue another then-handler
- p.then(function() {
- $ERROR("Should not be called (2) -- Promise rejected.");
- }, function() {
- sequence.push(5);
- checkSequence(sequence, "Should be third");
- }).then($DONE, $DONE);
-
- sequence.push(4);
- checkSequence(sequence, "Should be second");
+Promise.resolve().then(function () {
+ // enqueue another then-handler
+ p.then(function () {
+ $ERROR("Should not be called (2) -- Promise rejected.");
+ }, function () {
+ sequence.push(5);
+ checkSequence(sequence, "Should be third");
+ }).then($DONE, $DONE);
+
+ sequence.push(4);
+ checkSequence(sequence, "Should be second");
}).catch($DONE);
sequence.push(2);
diff --git a/test/built-ins/Promise/prototype/then/capability-executor-called-twice.js b/test/built-ins/Promise/prototype/then/capability-executor-called-twice.js
index f72869ba3..5006c282d 100644
--- a/test/built-ins/Promise/prototype/then/capability-executor-called-twice.js
+++ b/test/built-ins/Promise/prototype/then/capability-executor-called-twice.js
@@ -33,14 +33,14 @@ var promise = new class extends Promise {
}
return super(executor);
}
-}(function() {});
+}(function(){});
var checkPoint = "";
constructorFunction = function(executor) {
checkPoint += "a";
executor();
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
};
promise.then();
@@ -51,7 +51,7 @@ constructorFunction = function(executor) {
checkPoint += "a";
executor(undefined, undefined);
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
};
promise.then();
@@ -61,9 +61,9 @@ var checkPoint = "";
assert.throws(TypeError, function() {
constructorFunction = function(executor) {
checkPoint += "a";
- executor(undefined, function() {});
+ executor(undefined, function(){});
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
};
promise.then();
@@ -74,9 +74,9 @@ var checkPoint = "";
assert.throws(TypeError, function() {
constructorFunction = function(executor) {
checkPoint += "a";
- executor(function() {}, undefined);
+ executor(function(){}, undefined);
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
};
promise.then();
@@ -89,7 +89,7 @@ assert.throws(TypeError, function() {
checkPoint += "a";
executor("invalid value", 123);
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
};
promise.then();
diff --git a/test/built-ins/Promise/prototype/then/capability-executor-not-callable.js b/test/built-ins/Promise/prototype/then/capability-executor-not-callable.js
index 28f4b15b6..d230947d6 100644
--- a/test/built-ins/Promise/prototype/then/capability-executor-not-callable.js
+++ b/test/built-ins/Promise/prototype/then/capability-executor-not-callable.js
@@ -35,7 +35,7 @@ var promise = new class extends Promise {
}
return super(executor);
}
-}(function() {});
+}(function(){});
var checkPoint = "";
assert.throws(TypeError, function() {
@@ -72,7 +72,7 @@ var checkPoint = "";
assert.throws(TypeError, function() {
constructorFunction = function(executor) {
checkPoint += "a";
- executor(undefined, function() {});
+ executor(undefined, function(){});
checkPoint += "b";
};
promise.then();
@@ -83,7 +83,7 @@ var checkPoint = "";
assert.throws(TypeError, function() {
constructorFunction = function(executor) {
checkPoint += "a";
- executor(function() {}, undefined);
+ executor(function(){}, undefined);
checkPoint += "b";
};
promise.then();
diff --git a/test/built-ins/Promise/prototype/then/ctor-access-count.js b/test/built-ins/Promise/prototype/then/ctor-access-count.js
index 585850ed9..51e00ad78 100644
--- a/test/built-ins/Promise/prototype/then/ctor-access-count.js
+++ b/test/built-ins/Promise/prototype/then/ctor-access-count.js
@@ -29,9 +29,7 @@ flags: [async]
---*/
var callCount = 0;
-var prms = new Promise(function(resolve) {
- resolve();
-});
+var prms = new Promise(function(resolve) { resolve(); });
Object.defineProperty(prms, 'constructor', {
get: function() {
callCount += 1;
@@ -40,12 +38,12 @@ Object.defineProperty(prms, 'constructor', {
});
prms.then(function() {
- if (callCount !== 1) {
- $DONE('Expected constructor access count: 1. Actual: ' + callCount);
- return;
- }
+ if (callCount !== 1) {
+ $DONE('Expected constructor access count: 1. Actual: ' + callCount);
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/prototype/then/ctor-poisoned.js b/test/built-ins/Promise/prototype/then/ctor-poisoned.js
index d41a71a15..080d26a1c 100644
--- a/test/built-ins/Promise/prototype/then/ctor-poisoned.js
+++ b/test/built-ins/Promise/prototype/then/ctor-poisoned.js
@@ -13,9 +13,9 @@ description: Promise.prototype.then throws if Get(promise, "constructor") throws
var p = Promise.resolve("foo");
Object.defineProperty(p, "constructor", {
- get: function() {
- throw new Test262Error();
- }
+ get: function () {
+ throw new Test262Error();
+ }
});
assert.throws(Test262Error, function() {
diff --git a/test/built-ins/Promise/prototype/then/ctor-throws.js b/test/built-ins/Promise/prototype/then/ctor-throws.js
index 1532089f7..c6b52cb40 100644
--- a/test/built-ins/Promise/prototype/then/ctor-throws.js
+++ b/test/built-ins/Promise/prototype/then/ctor-throws.js
@@ -26,14 +26,10 @@ var BadCtor = function() {
};
var originalSpecies = Object.getOwnPropertyDescriptor(Promise, Symbol.species);
-Object.defineProperty(Promise, Symbol.species, {
- value: BadCtor
-});
+Object.defineProperty(Promise, Symbol.species, { value: BadCtor });
try {
- var p = new Promise(function(resolve) {
- resolve();
- });
+ var p = new Promise(function(resolve) { resolve(); });
assert.throws(Test262Error, function() {
p.then();
diff --git a/test/built-ins/Promise/prototype/then/prfm-fulfilled.js b/test/built-ins/Promise/prototype/then/prfm-fulfilled.js
index 285e12f9c..3db69300a 100644
--- a/test/built-ins/Promise/prototype/then/prfm-fulfilled.js
+++ b/test/built-ins/Promise/prototype/then/prfm-fulfilled.js
@@ -20,16 +20,14 @@ flags: [async]
---*/
var value = {};
-var p = new Promise(function(resolve) {
- resolve(value);
-});
+var p = new Promise(function(resolve) { resolve(value); });
p.then(function(x) {
- if (x !== value) {
- $DONE('The `onFulfilled` handler should be invoked with the promise result.');
- return;
- }
- $DONE();
-}, function() {
- $DONE('The `onRejected` handler should not be invoked.');
-});
+ if (x !== value) {
+ $DONE('The `onFulfilled` handler should be invoked with the promise result.');
+ return;
+ }
+ $DONE();
+ }, function() {
+ $DONE('The `onRejected` handler should not be invoked.');
+ });
diff --git a/test/built-ins/Promise/prototype/then/prfm-pending-fulfulled.js b/test/built-ins/Promise/prototype/then/prfm-pending-fulfulled.js
index b0251ddfe..64c3542a4 100644
--- a/test/built-ins/Promise/prototype/then/prfm-pending-fulfulled.js
+++ b/test/built-ins/Promise/prototype/then/prfm-pending-fulfulled.js
@@ -21,18 +21,16 @@ flags: [async]
var value = {};
var resolve;
-var p = new Promise(function(_resolve) {
- resolve = _resolve;
-});
+var p = new Promise(function(_resolve) { resolve = _resolve; });
p.then(function(x) {
- if (x !== value) {
- $DONE('The `onFulfilled` handler should be invoked with the promise result.');
- return;
- }
- $DONE();
-}, function() {
- $DONE('The `onRejected` handler should not be invoked.');
-});
+ if (x !== value) {
+ $DONE('The `onFulfilled` handler should be invoked with the promise result.');
+ return;
+ }
+ $DONE();
+ }, function() {
+ $DONE('The `onRejected` handler should not be invoked.');
+ });
resolve(value);
diff --git a/test/built-ins/Promise/prototype/then/prfm-pending-rejected.js b/test/built-ins/Promise/prototype/then/prfm-pending-rejected.js
index 998ecae2e..062acafc2 100644
--- a/test/built-ins/Promise/prototype/then/prfm-pending-rejected.js
+++ b/test/built-ins/Promise/prototype/then/prfm-pending-rejected.js
@@ -21,18 +21,16 @@ flags: [async]
var value = {};
var reject;
-var p = new Promise(function(_, _reject) {
- reject = _reject;
-});
+var p = new Promise(function(_, _reject) { reject = _reject; });
p.then(function() {
- $DONE('The `onFulfilled` handler should not be invoked.');
-}, function(x) {
- if (x !== value) {
- $DONE('The `onRejected` handler should be invoked with the promise result.');
- return;
- }
- $DONE();
-});
+ $DONE('The `onFulfilled` handler should not be invoked.');
+ }, function(x) {
+ if (x !== value) {
+ $DONE('The `onRejected` handler should be invoked with the promise result.');
+ return;
+ }
+ $DONE();
+ });
reject(value);
diff --git a/test/built-ins/Promise/prototype/then/prfm-rejected.js b/test/built-ins/Promise/prototype/then/prfm-rejected.js
index de59061bc..22e3b81b5 100644
--- a/test/built-ins/Promise/prototype/then/prfm-rejected.js
+++ b/test/built-ins/Promise/prototype/then/prfm-rejected.js
@@ -20,16 +20,14 @@ flags: [async]
---*/
var value = {};
-var p = new Promise(function(_, reject) {
- reject(value);
-});
+var p = new Promise(function(_, reject) { reject(value); });
p.then(function() {
- $DONE('The `onFulfilled` handler should not be invoked.');
-}, function(x) {
- if (x !== value) {
- $DONE('The `onRejected` handler should be invoked with the promise result.');
- return;
- }
- $DONE();
-});
+ $DONE('The `onFulfilled` handler should not be invoked.');
+ }, function(x) {
+ if (x !== value) {
+ $DONE('The `onRejected` handler should be invoked with the promise result.');
+ return;
+ }
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/prototype/then/reject-pending-fulfilled.js b/test/built-ins/Promise/prototype/then/reject-pending-fulfilled.js
index 5fce956c1..985591977 100644
--- a/test/built-ins/Promise/prototype/then/reject-pending-fulfilled.js
+++ b/test/built-ins/Promise/prototype/then/reject-pending-fulfilled.js
@@ -22,27 +22,23 @@ flags: [async]
---*/
var resolve;
-var thenable = new Promise(function(_resolve) {
- resolve = _resolve;
-});
-var p1 = new Promise(function(resolve) {
- resolve();
-});
+var thenable = new Promise(function(_resolve) { resolve = _resolve; });
+var p1 = new Promise(function(resolve) { resolve(); });
var p2;
p2 = p1.then(function() {
- throw thenable;
-});
+ throw thenable;
+ });
p2.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(x) {
- if (x !== thenable) {
- $DONE('The promise should be rejected with the resolution value of the provided promise.');
- return;
- }
+ $DONE('The promise should not be fulfilled.');
+ }, function(x) {
+ if (x !== thenable) {
+ $DONE('The promise should be rejected with the resolution value of the provided promise.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
resolve();
diff --git a/test/built-ins/Promise/prototype/then/reject-pending-rejected.js b/test/built-ins/Promise/prototype/then/reject-pending-rejected.js
index 03ff2902b..7d881d19e 100644
--- a/test/built-ins/Promise/prototype/then/reject-pending-rejected.js
+++ b/test/built-ins/Promise/prototype/then/reject-pending-rejected.js
@@ -23,27 +23,23 @@ flags: [async]
---*/
var reject;
-var thenable = new Promise(function(resolve) {
- resolve();
-});
-var p1 = new Promise(function(_, _reject) {
- reject = _reject;
-});
+var thenable = new Promise(function(resolve) { resolve(); });
+var p1 = new Promise(function(_, _reject) { reject = _reject; });
var p2;
p2 = p1.then(function() {}, function() {
- throw thenable;
-});
+ throw thenable;
+ });
p2.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(x) {
- if (x !== thenable) {
- $DONE('The promise should be rejected with the resolution value of the provided promise.');
- return;
- }
+ $DONE('The promise should not be fulfilled.');
+ }, function(x) {
+ if (x !== thenable) {
+ $DONE('The promise should be rejected with the resolution value of the provided promise.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
reject();
diff --git a/test/built-ins/Promise/prototype/then/reject-settled-fulfilled.js b/test/built-ins/Promise/prototype/then/reject-settled-fulfilled.js
index 97876bec0..8845061ad 100644
--- a/test/built-ins/Promise/prototype/then/reject-settled-fulfilled.js
+++ b/test/built-ins/Promise/prototype/then/reject-settled-fulfilled.js
@@ -29,25 +29,21 @@ info: |
flags: [async]
---*/
-var thenable = new Promise(function(resolve) {
- resolve();
-});
-var p1 = new Promise(function(resolve) {
- resolve();
-});
+var thenable = new Promise(function(resolve) { resolve(); });
+var p1 = new Promise(function(resolve) { resolve(); });
var p2;
p2 = p1.then(function() {
- throw thenable;
-});
+ throw thenable;
+ });
p2.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(x) {
- if (x !== thenable) {
- $DONE('The promise should be rejected with the resolution value of the provided promise.');
- return;
- }
+ $DONE('The promise should not be fulfilled.');
+ }, function(x) {
+ if (x !== thenable) {
+ $DONE('The promise should be rejected with the resolution value of the provided promise.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/prototype/then/reject-settled-rejected.js b/test/built-ins/Promise/prototype/then/reject-settled-rejected.js
index 3b0ae8f1c..8cfa17fb3 100644
--- a/test/built-ins/Promise/prototype/then/reject-settled-rejected.js
+++ b/test/built-ins/Promise/prototype/then/reject-settled-rejected.js
@@ -29,25 +29,21 @@ info: |
flags: [async]
---*/
-var thenable = new Promise(function(resolve) {
- resolve();
-});
-var p1 = new Promise(function(_, reject) {
- reject();
-});
+var thenable = new Promise(function(resolve) { resolve(); });
+var p1 = new Promise(function(_, reject) { reject(); });
var p2;
p2 = p1.then(function() {}, function() {
- throw thenable;
-});
+ throw thenable;
+ });
p2.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(x) {
- if (x !== thenable) {
- $DONE('The promise should be rejected with the resolution value of the provided promise.');
- return;
- }
+ $DONE('The promise should not be fulfilled.');
+ }, function(x) {
+ if (x !== thenable) {
+ $DONE('The promise should be rejected with the resolution value of the provided promise.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-non-obj.js b/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-non-obj.js
index 1866a7c0e..afd23f08a 100644
--- a/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-non-obj.js
+++ b/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-non-obj.js
@@ -22,24 +22,22 @@ flags: [async]
---*/
var resolve;
-var p1 = new Promise(function(_resolve) {
- resolve = _resolve;
-});
+var p1 = new Promise(function(_resolve) { resolve = _resolve; });
var p2;
p2 = p1.then(function() {
- return 23;
-});
+ return 23;
+ });
p2.then(function(value) {
- if (value !== 23) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (value !== 23) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
resolve();
diff --git a/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-non-thenable.js b/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-non-thenable.js
index f67aae302..72daa6189 100644
--- a/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-non-thenable.js
+++ b/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-non-thenable.js
@@ -26,28 +26,24 @@ info: |
flags: [async]
---*/
-var nonThenable = {
- then: null
-};
+var nonThenable = { then: null };
var resolve;
-var p1 = new Promise(function(_resolve) {
- resolve = _resolve;
-});
+var p1 = new Promise(function(_resolve) { resolve = _resolve; });
var p2;
p2 = p1.then(function() {
- return nonThenable;
-});
+ return nonThenable;
+ });
p2.then(function(value) {
- if (value !== nonThenable) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (value !== nonThenable) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
resolve();
diff --git a/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-poisoned-then.js b/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-poisoned-then.js
index bf5912812..7b2147f4d 100644
--- a/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-poisoned-then.js
+++ b/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-poisoned-then.js
@@ -30,24 +30,22 @@ var poisonedThen = Object.defineProperty({}, 'then', {
throw value;
}
});
-var p1 = new Promise(function(_resolve) {
- resolve = _resolve;
-});
+var p1 = new Promise(function(_resolve) { resolve = _resolve; });
var p2;
p2 = p1.then(function() {
- return poisonedThen;
-});
+ return poisonedThen;
+ });
p2.then(function(x) {
- $DONE('The promise should not be fulfilled.');
-}, function(x) {
- if (x !== value) {
- $DONE('The promise should be rejected with the thrown exception.');
- return;
- }
+ $DONE('The promise should not be fulfilled.');
+ }, function(x) {
+ if (x !== value) {
+ $DONE('The promise should be rejected with the thrown exception.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
resolve();
diff --git a/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-prms-cstm-then.js b/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-prms-cstm-then.js
index 0a1f979c4..299bd5467 100644
--- a/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-prms-cstm-then.js
+++ b/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-prms-cstm-then.js
@@ -30,12 +30,8 @@ flags: [async]
var value = {};
var resolve;
-var thenable = new Promise(function(resolve) {
- resolve();
-});
-var p1 = new Promise(function(_resolve) {
- resolve = _resolve;
-});
+var thenable = new Promise(function(resolve) { resolve(); });
+var p1 = new Promise(function(_resolve) { resolve = _resolve; });
var p2;
thenable.then = function(resolve) {
@@ -43,18 +39,18 @@ thenable.then = function(resolve) {
};
p2 = p1.then(function() {
- return thenable;
-});
+ return thenable;
+ });
p2.then(function(x) {
- if (x !== value) {
- $DONE('The promise should be fulfilled with the resolution value of the provided promise.');
- return;
- }
-
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ if (x !== value) {
+ $DONE('The promise should be fulfilled with the resolution value of the provided promise.');
+ return;
+ }
+
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
resolve();
diff --git a/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-self.js b/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-self.js
index 16afaee98..f27f9034d 100644
--- a/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-self.js
+++ b/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-self.js
@@ -24,29 +24,27 @@ flags: [async]
---*/
var resolve;
-var p1 = new Promise(function(_resolve) {
- resolve = _resolve;
-});
+var p1 = new Promise(function(_resolve) { resolve = _resolve; });
var p2;
p2 = p1.then(function() {
- return p2;
-});
+ return p2;
+ });
p2.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(reason) {
- if (!reason) {
- $DONE('The promise should be rejected with a value.');
- return;
- }
-
- if (reason.constructor !== TypeError) {
- $DONE('The promise should be rejected with a TypeError instance.');
- return;
- }
-
- $DONE();
-});
+ $DONE('The promise should not be fulfilled.');
+ }, function(reason) {
+ if (!reason) {
+ $DONE('The promise should be rejected with a value.');
+ return;
+ }
+
+ if (reason.constructor !== TypeError) {
+ $DONE('The promise should be rejected with a TypeError instance.');
+ return;
+ }
+
+ $DONE();
+ });
resolve();
diff --git a/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-thenable.js b/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-thenable.js
index 1d32eca24..9df8932aa 100644
--- a/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-thenable.js
+++ b/test/built-ins/Promise/prototype/then/resolve-pending-fulfilled-thenable.js
@@ -30,27 +30,23 @@ flags: [async]
var value = {};
var resolve;
-var thenable = new Promise(function(resolve) {
- resolve(value);
-});
-var p1 = new Promise(function(_resolve) {
- resolve = _resolve;
-});
+var thenable = new Promise(function(resolve) { resolve(value); });
+var p1 = new Promise(function(_resolve) { resolve = _resolve; });
var p2;
p2 = p1.then(function() {
- return thenable;
-});
+ return thenable;
+ });
p2.then(function(x) {
- if (x !== value) {
- $DONE('The promise should be fulfilled with the resolution value of the provided promise.');
- return;
- }
+ if (x !== value) {
+ $DONE('The promise should be fulfilled with the resolution value of the provided promise.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
resolve();
diff --git a/test/built-ins/Promise/prototype/then/resolve-pending-rejected-non-obj.js b/test/built-ins/Promise/prototype/then/resolve-pending-rejected-non-obj.js
index 01f09f241..27ba9746f 100644
--- a/test/built-ins/Promise/prototype/then/resolve-pending-rejected-non-obj.js
+++ b/test/built-ins/Promise/prototype/then/resolve-pending-rejected-non-obj.js
@@ -23,24 +23,22 @@ flags: [async]
---*/
var reject;
-var p1 = new Promise(function(_, _reject) {
- reject = _reject;
-});
+var p1 = new Promise(function(_, _reject) { reject = _reject; });
var p2;
p2 = p1.then(function() {}, function() {
- return 23;
-});
+ return 23;
+ });
p2.then(function(value) {
- if (value !== 23) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (value !== 23) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
reject();
diff --git a/test/built-ins/Promise/prototype/then/resolve-pending-rejected-non-thenable.js b/test/built-ins/Promise/prototype/then/resolve-pending-rejected-non-thenable.js
index 61bc8613c..85178a822 100644
--- a/test/built-ins/Promise/prototype/then/resolve-pending-rejected-non-thenable.js
+++ b/test/built-ins/Promise/prototype/then/resolve-pending-rejected-non-thenable.js
@@ -27,28 +27,24 @@ info: |
flags: [async]
---*/
-var nonThenable = {
- then: null
-};
+var nonThenable = { then: null };
var reject;
-var p1 = new Promise(function(_, _reject) {
- reject = _reject;
-});
+var p1 = new Promise(function(_, _reject) { reject = _reject; });
var p2;
p2 = p1.then(function() {}, function() {
- return nonThenable;
-});
+ return nonThenable;
+ });
p2.then(function(value) {
- if (value !== nonThenable) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (value !== nonThenable) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
reject();
diff --git a/test/built-ins/Promise/prototype/then/resolve-pending-rejected-poisoned-then.js b/test/built-ins/Promise/prototype/then/resolve-pending-rejected-poisoned-then.js
index 800d11004..83e53f804 100644
--- a/test/built-ins/Promise/prototype/then/resolve-pending-rejected-poisoned-then.js
+++ b/test/built-ins/Promise/prototype/then/resolve-pending-rejected-poisoned-then.js
@@ -31,24 +31,22 @@ var poisonedThen = Object.defineProperty({}, 'then', {
throw value;
}
});
-var p1 = new Promise(function(_, _reject) {
- reject = _reject;
-});
+var p1 = new Promise(function(_, _reject) { reject = _reject; });
var p2;
p2 = p1.then(function() {}, function() {
- return poisonedThen;
-});
+ return poisonedThen;
+ });
p2.then(function(x) {
- $DONE('The promise should not be fulfilled.');
-}, function(x) {
- if (x !== value) {
- $DONE('The promise should be rejected with the thrown exception.');
- return;
- }
+ $DONE('The promise should not be fulfilled.');
+ }, function(x) {
+ if (x !== value) {
+ $DONE('The promise should be rejected with the thrown exception.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
reject();
diff --git a/test/built-ins/Promise/prototype/then/resolve-pending-rejected-prms-cstm-then.js b/test/built-ins/Promise/prototype/then/resolve-pending-rejected-prms-cstm-then.js
index d1bbd6737..2d4e1c011 100644
--- a/test/built-ins/Promise/prototype/then/resolve-pending-rejected-prms-cstm-then.js
+++ b/test/built-ins/Promise/prototype/then/resolve-pending-rejected-prms-cstm-then.js
@@ -31,12 +31,8 @@ flags: [async]
var value = {};
var reject;
-var thenable = new Promise(function(resolve) {
- resolve();
-});
-var p1 = new Promise(function(_, _reject) {
- reject = _reject;
-});
+var thenable = new Promise(function(resolve) { resolve(); });
+var p1 = new Promise(function(_, _reject) { reject = _reject; });
var p2;
thenable.then = function(resolve) {
@@ -44,18 +40,18 @@ thenable.then = function(resolve) {
};
p2 = p1.then(function() {}, function() {
- return thenable;
-});
+ return thenable;
+ });
p2.then(function(x) {
- if (x !== value) {
- $DONE('The promise should be fulfilled with the resolution value of the provided promise.');
- return;
- }
-
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ if (x !== value) {
+ $DONE('The promise should be fulfilled with the resolution value of the provided promise.');
+ return;
+ }
+
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
reject();
diff --git a/test/built-ins/Promise/prototype/then/resolve-pending-rejected-self.js b/test/built-ins/Promise/prototype/then/resolve-pending-rejected-self.js
index 2a3b37978..7ae0c23e3 100644
--- a/test/built-ins/Promise/prototype/then/resolve-pending-rejected-self.js
+++ b/test/built-ins/Promise/prototype/then/resolve-pending-rejected-self.js
@@ -25,29 +25,27 @@ flags: [async]
---*/
var reject;
-var p1 = new Promise(function(_, _reject) {
- reject = _reject;
-});
+var p1 = new Promise(function(_, _reject) { reject = _reject; });
var p2;
p2 = p1.then(function() {}, function() {
- return p2;
-});
+ return p2;
+ });
p2.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(reason) {
- if (!reason) {
- $DONE('The promise should be rejected with a value.');
- return;
- }
-
- if (reason.constructor !== TypeError) {
- $DONE('The promise should be rejected with a TypeError instance.');
- return;
- }
-
- $DONE();
-});
+ $DONE('The promise should not be fulfilled.');
+ }, function(reason) {
+ if (!reason) {
+ $DONE('The promise should be rejected with a value.');
+ return;
+ }
+
+ if (reason.constructor !== TypeError) {
+ $DONE('The promise should be rejected with a TypeError instance.');
+ return;
+ }
+
+ $DONE();
+ });
reject();
diff --git a/test/built-ins/Promise/prototype/then/resolve-pending-rejected-thenable.js b/test/built-ins/Promise/prototype/then/resolve-pending-rejected-thenable.js
index 94cc16e86..933ce34ec 100644
--- a/test/built-ins/Promise/prototype/then/resolve-pending-rejected-thenable.js
+++ b/test/built-ins/Promise/prototype/then/resolve-pending-rejected-thenable.js
@@ -31,27 +31,23 @@ flags: [async]
var value = {};
var reject;
-var thenable = new Promise(function(resolve) {
- resolve(value);
-});
-var p1 = new Promise(function(_, _reject) {
- reject = _reject;
-});
+var thenable = new Promise(function(resolve) { resolve(value); });
+var p1 = new Promise(function(_, _reject) { reject = _reject; });
var p2;
p2 = p1.then(function() {}, function() {
- return thenable;
-});
+ return thenable;
+ });
p2.then(function(x) {
- if (x !== value) {
- $DONE('The promise should be fulfilled with the resolution value of the provided promise.');
- return;
- }
+ if (x !== value) {
+ $DONE('The promise should be fulfilled with the resolution value of the provided promise.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
reject();
diff --git a/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-non-obj.js b/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-non-obj.js
index f57576ee8..003d0ee61 100644
--- a/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-non-obj.js
+++ b/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-non-obj.js
@@ -28,22 +28,20 @@ info: |
flags: [async]
---*/
-var p1 = new Promise(function(resolve) {
- resolve();
-});
+var p1 = new Promise(function(resolve) { resolve(); });
var p2;
p2 = p1.then(function() {
- return 23;
-});
+ return 23;
+ });
p2.then(function(value) {
- if (value !== 23) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (value !== 23) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-non-thenable.js b/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-non-thenable.js
index 5065cd131..484c6f6aa 100644
--- a/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-non-thenable.js
+++ b/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-non-thenable.js
@@ -33,25 +33,21 @@ info: |
flags: [async]
---*/
-var nonThenable = {
- then: null
-};
-var p1 = new Promise(function(resolve) {
- resolve();
-});
+var nonThenable = { then: null };
+var p1 = new Promise(function(resolve) { resolve(); });
var p2;
p2 = p1.then(function() {
- return nonThenable;
-});
+ return nonThenable;
+ });
p2.then(function(value) {
- if (value !== nonThenable) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (value !== nonThenable) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-poisoned-then.js b/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-poisoned-then.js
index 8ac375540..303044a53 100644
--- a/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-poisoned-then.js
+++ b/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-poisoned-then.js
@@ -36,22 +36,20 @@ var poisonedThen = Object.defineProperty({}, 'then', {
throw value;
}
});
-var p1 = new Promise(function(resolve) {
- resolve();
-});
+var p1 = new Promise(function(resolve) { resolve(); });
var p2;
p2 = p1.then(function() {
- return poisonedThen;
-});
+ return poisonedThen;
+ });
p2.then(function(x) {
- $DONE('The promise should not be fulfilled.');
-}, function(x) {
- if (x !== value) {
- $DONE('The promise should be rejected with the thrown exception.');
- return;
- }
+ $DONE('The promise should not be fulfilled.');
+ }, function(x) {
+ if (x !== value) {
+ $DONE('The promise should be rejected with the thrown exception.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-prms-cstm-then.js b/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-prms-cstm-then.js
index abcea8a24..f3d108dfa 100644
--- a/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-prms-cstm-then.js
+++ b/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-prms-cstm-then.js
@@ -36,12 +36,8 @@ flags: [async]
---*/
var value = {};
-var thenable = new Promise(function(resolve) {
- resolve();
-});
-var p1 = new Promise(function(resolve) {
- resolve();
-});
+var thenable = new Promise(function(resolve) { resolve(); });
+var p1 = new Promise(function(resolve) { resolve(); });
var p2;
thenable.then = function(resolve) {
@@ -49,16 +45,16 @@ thenable.then = function(resolve) {
};
p2 = p1.then(function() {
- return thenable;
-});
+ return thenable;
+ });
p2.then(function(x) {
- if (x !== value) {
- $DONE('The promise should be fulfilled with the resolution value of the provided promise.');
- return;
- }
-
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ if (x !== value) {
+ $DONE('The promise should be fulfilled with the resolution value of the provided promise.');
+ return;
+ }
+
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-self.js b/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-self.js
index 1091fe75d..99f1d05a4 100644
--- a/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-self.js
+++ b/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-self.js
@@ -30,27 +30,25 @@ info: |
flags: [async]
---*/
-var p1 = new Promise(function(resolve) {
- resolve();
-});
+var p1 = new Promise(function(resolve) { resolve(); });
var p2;
p2 = p1.then(function() {
- return p2;
-});
+ return p2;
+ });
p2.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(reason) {
- if (!reason) {
- $DONE('The promise should be rejected with a value.');
- return;
- }
-
- if (reason.constructor !== TypeError) {
- $DONE('The promise should be rejected with a TypeError instance.');
- return;
- }
-
- $DONE();
-});
+ $DONE('The promise should not be fulfilled.');
+ }, function(reason) {
+ if (!reason) {
+ $DONE('The promise should be rejected with a value.');
+ return;
+ }
+
+ if (reason.constructor !== TypeError) {
+ $DONE('The promise should be rejected with a TypeError instance.');
+ return;
+ }
+
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-thenable.js b/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-thenable.js
index 98a718bf2..0baaa5c0d 100644
--- a/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-thenable.js
+++ b/test/built-ins/Promise/prototype/then/resolve-settled-fulfilled-thenable.js
@@ -36,25 +36,21 @@ flags: [async]
---*/
var value = {};
-var thenable = new Promise(function(resolve) {
- resolve(value);
-});
-var p1 = new Promise(function(resolve) {
- resolve();
-});
+var thenable = new Promise(function(resolve) { resolve(value); });
+var p1 = new Promise(function(resolve) { resolve(); });
var p2;
p2 = p1.then(function() {
- return thenable;
-});
+ return thenable;
+ });
p2.then(function(x) {
- if (x !== value) {
- $DONE('The promise should be fulfilled with the resolution value of the provided promise.');
- return;
- }
+ if (x !== value) {
+ $DONE('The promise should be fulfilled with the resolution value of the provided promise.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/prototype/then/resolve-settled-rejected-non-obj.js b/test/built-ins/Promise/prototype/then/resolve-settled-rejected-non-obj.js
index a4828310a..3a8992d39 100644
--- a/test/built-ins/Promise/prototype/then/resolve-settled-rejected-non-obj.js
+++ b/test/built-ins/Promise/prototype/then/resolve-settled-rejected-non-obj.js
@@ -28,22 +28,20 @@ info: |
flags: [async]
---*/
-var p1 = new Promise(function(_, reject) {
- reject();
-});
+var p1 = new Promise(function(_, reject) { reject(); });
var p2;
p2 = p1.then(function() {}, function() {
- return 23;
-});
+ return 23;
+ });
p2.then(function(value) {
- if (value !== 23) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (value !== 23) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/prototype/then/resolve-settled-rejected-non-thenable.js b/test/built-ins/Promise/prototype/then/resolve-settled-rejected-non-thenable.js
index 13e72aba0..8e4b424fd 100644
--- a/test/built-ins/Promise/prototype/then/resolve-settled-rejected-non-thenable.js
+++ b/test/built-ins/Promise/prototype/then/resolve-settled-rejected-non-thenable.js
@@ -33,25 +33,21 @@ info: |
flags: [async]
---*/
-var nonThenable = {
- then: null
-};
-var p1 = new Promise(function(_, reject) {
- reject();
-});
+var nonThenable = { then: null };
+var p1 = new Promise(function(_, reject) { reject(); });
var p2;
p2 = p1.then(function() {}, function() {
- return nonThenable;
-});
+ return nonThenable;
+ });
p2.then(function(value) {
- if (value !== nonThenable) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (value !== nonThenable) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/prototype/then/resolve-settled-rejected-poisoned-then.js b/test/built-ins/Promise/prototype/then/resolve-settled-rejected-poisoned-then.js
index a60f1b10c..6087049a9 100644
--- a/test/built-ins/Promise/prototype/then/resolve-settled-rejected-poisoned-then.js
+++ b/test/built-ins/Promise/prototype/then/resolve-settled-rejected-poisoned-then.js
@@ -36,22 +36,20 @@ var poisonedThen = Object.defineProperty({}, 'then', {
throw value;
}
});
-var p1 = new Promise(function(_, reject) {
- reject();
-});
+var p1 = new Promise(function(_, reject) { reject(); });
var p2;
p2 = p1.then(function() {}, function() {
- return poisonedThen;
-});
+ return poisonedThen;
+ });
p2.then(function(x) {
- $DONE('The promise should not be fulfilled.');
-}, function(x) {
- if (x !== value) {
- $DONE('The promise should be rejected with the thrown exception.');
- return;
- }
+ $DONE('The promise should not be fulfilled.');
+ }, function(x) {
+ if (x !== value) {
+ $DONE('The promise should be rejected with the thrown exception.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/prototype/then/resolve-settled-rejected-prms-cstm-then.js b/test/built-ins/Promise/prototype/then/resolve-settled-rejected-prms-cstm-then.js
index babecd9e1..68f661a11 100644
--- a/test/built-ins/Promise/prototype/then/resolve-settled-rejected-prms-cstm-then.js
+++ b/test/built-ins/Promise/prototype/then/resolve-settled-rejected-prms-cstm-then.js
@@ -36,12 +36,8 @@ flags: [async]
---*/
var value = {};
-var thenable = new Promise(function(resolve) {
- resolve();
-});
-var p1 = new Promise(function(_, reject) {
- reject();
-});
+var thenable = new Promise(function(resolve) { resolve(); });
+var p1 = new Promise(function(_, reject) { reject(); });
var p2;
thenable.then = function(resolve) {
@@ -49,16 +45,16 @@ thenable.then = function(resolve) {
};
p2 = p1.then(function() {}, function() {
- return thenable;
-});
+ return thenable;
+ });
p2.then(function(x) {
- if (x !== value) {
- $DONE('The promise should be fulfilled with the resolution value of the provided promise.');
- return;
- }
-
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ if (x !== value) {
+ $DONE('The promise should be fulfilled with the resolution value of the provided promise.');
+ return;
+ }
+
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/prototype/then/resolve-settled-rejected-self.js b/test/built-ins/Promise/prototype/then/resolve-settled-rejected-self.js
index 9d7f13693..877edfc7d 100644
--- a/test/built-ins/Promise/prototype/then/resolve-settled-rejected-self.js
+++ b/test/built-ins/Promise/prototype/then/resolve-settled-rejected-self.js
@@ -30,27 +30,25 @@ info: |
flags: [async]
---*/
-var p1 = new Promise(function(_, reject) {
- reject();
-});
+var p1 = new Promise(function(_, reject) { reject(); });
var p2;
p2 = p1.then(function() {}, function() {
- return p2;
-});
+ return p2;
+ });
p2.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(reason) {
- if (!reason) {
- $DONE('The promise should be rejected with a value.');
- return;
- }
-
- if (reason.constructor !== TypeError) {
- $DONE('The promise should be rejected with a TypeError instance.');
- return;
- }
-
- $DONE();
-});
+ $DONE('The promise should not be fulfilled.');
+ }, function(reason) {
+ if (!reason) {
+ $DONE('The promise should be rejected with a value.');
+ return;
+ }
+
+ if (reason.constructor !== TypeError) {
+ $DONE('The promise should be rejected with a TypeError instance.');
+ return;
+ }
+
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/prototype/then/resolve-settled-rejected-thenable.js b/test/built-ins/Promise/prototype/then/resolve-settled-rejected-thenable.js
index 333bbeb14..1a3855254 100644
--- a/test/built-ins/Promise/prototype/then/resolve-settled-rejected-thenable.js
+++ b/test/built-ins/Promise/prototype/then/resolve-settled-rejected-thenable.js
@@ -36,25 +36,21 @@ flags: [async]
---*/
var value = {};
-var thenable = new Promise(function(resolve) {
- resolve(value);
-});
-var p1 = new Promise(function(_, reject) {
- reject();
-});
+var thenable = new Promise(function(resolve) { resolve(value); });
+var p1 = new Promise(function(_, reject) { reject(); });
var p2;
p2 = p1.then(function() {}, function() {
- return thenable;
-});
+ return thenable;
+ });
p2.then(function(x) {
- if (x !== value) {
- $DONE('The promise should be fulfilled with the resolution value of the provided promise.');
- return;
- }
+ if (x !== value) {
+ $DONE('The promise should be fulfilled with the resolution value of the provided promise.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
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 4a9918517..a956ab8a3 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
@@ -13,25 +13,25 @@ flags: [async, noStrict]
---*/
var expectedThis = this,
- obj = {};
+ obj = {};
var p = Promise.resolve(obj).then(function(arg) {
- if (this !== expectedThis) {
- $DONE("'this' must be global object, got " + this);
- return;
- }
+ if (this !== expectedThis) {
+ $DONE("'this' must be global object, got " + this);
+ return;
+ }
- if (arg !== obj) {
- $DONE("Expected promise to be fulfilled by obj, actually " + arg);
- return;
- }
+ if (arg !== obj) {
+ $DONE("Expected promise to be fulfilled by obj, actually " + arg);
+ return;
+ }
- if (arguments.length !== 1) {
- $DONE('Expected handler function to be called with exactly 1 argument.');
- return;
- }
+ if (arguments.length !== 1) {
+ $DONE('Expected handler function to be called with exactly 1 argument.');
+ return;
+ }
- $DONE();
+ $DONE();
}, function() {
$DONE('The promise should not be rejected.');
});
diff --git a/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-invoke-strict.js b/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-invoke-strict.js
index c8b9966ed..e431a2793 100644
--- a/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-invoke-strict.js
+++ b/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-invoke-strict.js
@@ -13,25 +13,25 @@ flags: [async, onlyStrict]
---*/
var expectedThis = undefined,
- obj = {};
+ obj = {};
var p = Promise.resolve(obj).then(function(arg) {
- if (this !== expectedThis) {
- $DONE("'this' must be undefined, got " + this);
- return;
- }
+ if (this !== expectedThis) {
+ $DONE("'this' must be undefined, got " + this);
+ return;
+ }
- if (arg !== obj) {
- $DONE("Expected promise to be fulfilled by obj, actually " + arg);
- return;
- }
+ if (arg !== obj) {
+ $DONE("Expected promise to be fulfilled by obj, actually " + arg);
+ return;
+ }
- if (arguments.length !== 1) {
- $DONE('Expected handler function to be called with exactly 1 argument.');
- return;
- }
+ if (arguments.length !== 1) {
+ $DONE('Expected handler function to be called with exactly 1 argument.');
+ return;
+ }
- $DONE();
+ $DONE();
}, function() {
$DONE('The promise should not be rejected.');
});
diff --git a/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-next-abrupt.js b/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-next-abrupt.js
index 992051775..9024a896d 100644
--- a/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-next-abrupt.js
+++ b/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-next-abrupt.js
@@ -22,24 +22,24 @@ var fulfilledCallCount = 0;
var rejectedCallCount = 0;
promise.then(function() {
- fulfilledCallCount += 1;
- throw new Error();
-}, function() {
- rejectedCallCount += 1;
-});
+ fulfilledCallCount += 1;
+ throw new Error();
+ }, function() {
+ rejectedCallCount += 1;
+ });
promise.then(function() {
- if (fulfilledCallCount !== 1) {
- $DONE('Expected "onFulfilled" handler to be invoked exactly once.');
- return;
- }
+ if (fulfilledCallCount !== 1) {
+ $DONE('Expected "onFulfilled" handler to be invoked exactly once.');
+ return;
+ }
- if (rejectedCallCount !== 0) {
- $DONE('Expected "onRejected" handler to not be invoked.');
- return;
- }
+ if (rejectedCallCount !== 0) {
+ $DONE('Expected "onRejected" handler to not be invoked.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('This promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('This promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-next.js b/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-next.js
index 460ee909c..a2f763a51 100644
--- a/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-next.js
+++ b/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-next.js
@@ -21,33 +21,33 @@ var promise = new Promise(function(resolve) {
var log = '';
promise.then(function() {
- log += 'a';
-}, function() {
- log += 'A';
-});
+ log += 'a';
+ }, function() {
+ log += 'A';
+ });
promise.then(function() {
- log += 'b';
-}, function() {
- log += 'B';
-});
+ log += 'b';
+ }, function() {
+ log += 'B';
+ });
promise.then(function() {
- log += 'c';
-}, function() {
- log += 'C';
-});
+ log += 'c';
+ }, function() {
+ log += 'C';
+ });
promise.then(function() {
- if (log !== 'abc') {
- $DONE(
- 'Expected each "onFulfilled" handler to be invoked exactly once in series. ' +
- 'Expected: abc. Actual: ' + log
- );
- return;
- }
+ if (log !== 'abc') {
+ $DONE(
+ 'Expected each "onFulfilled" handler to be invoked exactly once in series. ' +
+ 'Expected: abc. Actual: ' + log
+ );
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('This promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('This promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-return-abrupt.js b/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-return-abrupt.js
index 4accef172..e0cb6215d 100644
--- a/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-return-abrupt.js
+++ b/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-return-abrupt.js
@@ -35,16 +35,16 @@ var p1 = new Promise(function(resolve) {
var p2;
p2 = p1.then(function() {
- throw value;
-}, function() {});
+ throw value;
+ }, function() {});
p2.then(function() {
- $DONE('The `onFulfilled` handler should not be invoked.');
-}, function(x) {
- if (x !== value) {
- $DONE('The `onRejected` handler should be invoked with the promise result.');
- return;
- }
+ $DONE('The `onFulfilled` handler should not be invoked.');
+ }, function(x) {
+ if (x !== value) {
+ $DONE('The `onRejected` handler should be invoked with the promise result.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-return-normal.js b/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-return-normal.js
index 2241de9c7..f75ee39ed 100644
--- a/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-return-normal.js
+++ b/test/built-ins/Promise/prototype/then/rxn-handler-fulfilled-return-normal.js
@@ -35,16 +35,16 @@ var p1 = new Promise(function(resolve) {
var p2;
p2 = p1.then(function() {
- return value;
-}, function() {});
+ return value;
+ }, function() {});
p2.then(function(x) {
- if (x !== value) {
- $DONE('The `onFulfilled` handler should be invoked with the promise result.');
- return;
- }
+ if (x !== value) {
+ $DONE('The `onFulfilled` handler should be invoked with the promise result.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The `onRejected` handler should not be invoked.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The `onRejected` handler should not be invoked.');
+ });
diff --git a/test/built-ins/Promise/prototype/then/rxn-handler-identity.js b/test/built-ins/Promise/prototype/then/rxn-handler-identity.js
index 24b30c088..de2005b03 100644
--- a/test/built-ins/Promise/prototype/then/rxn-handler-identity.js
+++ b/test/built-ins/Promise/prototype/then/rxn-handler-identity.js
@@ -12,13 +12,13 @@ flags: [async]
var obj = {};
-var p = Promise.resolve(obj).then( /*Identity, Thrower*/ )
- .then(function(arg) {
- if (arg !== obj) {
- $DONE("Expected promise to be fulfilled with obj, actually " + arg);
- return;
- }
- $DONE();
- }, function() {
- $DONE('The promise should not be rejected.');
- });
+var p = Promise.resolve(obj).then(/*Identity, Thrower*/)
+ .then(function (arg) {
+ if (arg !== obj) {
+ $DONE("Expected promise to be fulfilled with obj, actually " + arg);
+ return;
+ }
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
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 e95e55d49..f848a8a2e 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
@@ -13,25 +13,25 @@ flags: [async, noStrict]
---*/
var expectedThis = this,
- obj = {};
+ obj = {};
-var p = Promise.reject(obj).then(function() {
- $DONE("Unexpected fulfillment; expected rejection.");
+var p = Promise.reject(obj).then(function () {
+ $DONE("Unexpected fulfillment; expected rejection.");
}, function(arg) {
- if (this !== expectedThis) {
- $DONE("'this' must be global object, got " + this);
- return;
- }
+ if (this !== expectedThis) {
+ $DONE("'this' must be global object, got " + this);
+ return;
+ }
- if (arg !== obj) {
- $DONE("Expected promise to be rejected with obj, actually " + arg);
- return;
- }
+ if (arg !== obj) {
+ $DONE("Expected promise to be rejected with obj, actually " + arg);
+ return;
+ }
- if (arguments.length !== 1) {
- $DONE('Expected handler function to be called with exactly 1 argument.');
- return;
- }
+ if (arguments.length !== 1) {
+ $DONE('Expected handler function to be called with exactly 1 argument.');
+ return;
+ }
- $DONE();
+ $DONE();
});
diff --git a/test/built-ins/Promise/prototype/then/rxn-handler-rejected-invoke-strict.js b/test/built-ins/Promise/prototype/then/rxn-handler-rejected-invoke-strict.js
index 9842201f5..19cbbc9ec 100644
--- a/test/built-ins/Promise/prototype/then/rxn-handler-rejected-invoke-strict.js
+++ b/test/built-ins/Promise/prototype/then/rxn-handler-rejected-invoke-strict.js
@@ -13,25 +13,25 @@ flags: [async, onlyStrict]
---*/
var expectedThis = undefined,
- obj = {};
+ obj = {};
-var p = Promise.reject(obj).then(function() {
- $DONE("Unexpected fulfillment; expected rejection.");
+var p = Promise.reject(obj).then(function () {
+ $DONE("Unexpected fulfillment; expected rejection.");
}, function(arg) {
- if (this !== expectedThis) {
- $DONE("'this' must be undefined, got " + this);
- return;
- }
+ if (this !== expectedThis) {
+ $DONE("'this' must be undefined, got " + this);
+ return;
+ }
- if (arg !== obj) {
- $DONE("Expected promise to be rejected with obj, actually " + arg);
- return;
- }
+ if (arg !== obj) {
+ $DONE("Expected promise to be rejected with obj, actually " + arg);
+ return;
+ }
- if (arguments.length !== 1) {
- $DONE('Expected handler function to be called with exactly 1 argument.');
- return;
- }
+ if (arguments.length !== 1) {
+ $DONE('Expected handler function to be called with exactly 1 argument.');
+ return;
+ }
- $DONE();
+ $DONE();
});
diff --git a/test/built-ins/Promise/prototype/then/rxn-handler-rejected-next-abrupt.js b/test/built-ins/Promise/prototype/then/rxn-handler-rejected-next-abrupt.js
index 848a88538..2363577e8 100644
--- a/test/built-ins/Promise/prototype/then/rxn-handler-rejected-next-abrupt.js
+++ b/test/built-ins/Promise/prototype/then/rxn-handler-rejected-next-abrupt.js
@@ -22,24 +22,24 @@ var fulfilledCallCount = 0;
var rejectedCallCount = 0;
promise.then(function() {
- fulfilledCallCount += 1;
-}, function() {
- rejectedCallCount += 1;
- throw new Error();
-});
+ fulfilledCallCount += 1;
+ }, function() {
+ rejectedCallCount += 1;
+ throw new Error();
+ });
promise.then(function() {
- $DONE('This promise should not be fulfilled.');
-}, function() {
- if (fulfilledCallCount !== 0) {
- $DONE('Expected "onFulfilled" handler to not be invoked.');
- return;
- }
+ $DONE('This promise should not be fulfilled.');
+ }, function() {
+ if (fulfilledCallCount !== 0) {
+ $DONE('Expected "onFulfilled" handler to not be invoked.');
+ return;
+ }
- if (rejectedCallCount !== 1) {
- $DONE('Expected "onRejected" handler to be invoked exactly once.');
- return;
- }
+ if (rejectedCallCount !== 1) {
+ $DONE('Expected "onRejected" handler to be invoked exactly once.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/prototype/then/rxn-handler-rejected-next.js b/test/built-ins/Promise/prototype/then/rxn-handler-rejected-next.js
index b1497b0a0..40ef4bfd6 100644
--- a/test/built-ins/Promise/prototype/then/rxn-handler-rejected-next.js
+++ b/test/built-ins/Promise/prototype/then/rxn-handler-rejected-next.js
@@ -21,33 +21,33 @@ var promise = new Promise(function(_, reject) {
var log = '';
promise.then(function() {
- log += 'A';
-}, function() {
- log += 'a';
-});
+ log += 'A';
+ }, function() {
+ log += 'a';
+ });
promise.then(function() {
- log += 'B';
-}, function() {
- log += 'b';
-});
+ log += 'B';
+ }, function() {
+ log += 'b';
+ });
promise.then(function() {
- log += 'C';
-}, function() {
- log += 'c';
-});
+ log += 'C';
+ }, function() {
+ log += 'c';
+ });
promise.then(function() {
- $DONE('This promise should not be fulfilled.');
-}, function() {
- if (log !== 'abc') {
- $DONE(
- 'Expected each "onFulfilled" handler to be invoked exactly once in series. ' +
- 'Expected: abc. Actual: ' + log
- );
- return;
- }
+ $DONE('This promise should not be fulfilled.');
+ }, function() {
+ if (log !== 'abc') {
+ $DONE(
+ 'Expected each "onFulfilled" handler to be invoked exactly once in series. ' +
+ 'Expected: abc. Actual: ' + log
+ );
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/prototype/then/rxn-handler-rejected-return-abrupt.js b/test/built-ins/Promise/prototype/then/rxn-handler-rejected-return-abrupt.js
index fe8054f9a..3588f64dd 100644
--- a/test/built-ins/Promise/prototype/then/rxn-handler-rejected-return-abrupt.js
+++ b/test/built-ins/Promise/prototype/then/rxn-handler-rejected-return-abrupt.js
@@ -35,16 +35,16 @@ var p1 = new Promise(function(_, reject) {
var p2;
p2 = p1.then(function() {}, function() {
- throw value;
-});
+ throw value;
+ });
p2.then(function() {
- $DONE('The `onFulfilled` handler should not be invoked.');
-}, function(x) {
- if (x !== value) {
- $DONE('The `onRejected` handler should be invoked with the promise result.');
- return;
- }
+ $DONE('The `onFulfilled` handler should not be invoked.');
+ }, function(x) {
+ if (x !== value) {
+ $DONE('The `onRejected` handler should be invoked with the promise result.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/prototype/then/rxn-handler-rejected-return-normal.js b/test/built-ins/Promise/prototype/then/rxn-handler-rejected-return-normal.js
index eb70b6e6c..3fe4b09c6 100644
--- a/test/built-ins/Promise/prototype/then/rxn-handler-rejected-return-normal.js
+++ b/test/built-ins/Promise/prototype/then/rxn-handler-rejected-return-normal.js
@@ -35,16 +35,16 @@ var p1 = new Promise(function(_, reject) {
var p2;
p2 = p1.then(function() {}, function() {
- return value;
-});
+ return value;
+ });
p2.then(function(x) {
- if (x !== value) {
- $DONE('The `onFulfilled` handler should be invoked with the promise result.');
- return;
- }
+ if (x !== value) {
+ $DONE('The `onFulfilled` handler should be invoked with the promise result.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The `onRejected` handler should not be invoked.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The `onRejected` handler should not be invoked.');
+ });
diff --git a/test/built-ins/Promise/prototype/then/rxn-handler-thrower.js b/test/built-ins/Promise/prototype/then/rxn-handler-thrower.js
index 58b185a91..217e10e4d 100644
--- a/test/built-ins/Promise/prototype/then/rxn-handler-thrower.js
+++ b/test/built-ins/Promise/prototype/then/rxn-handler-thrower.js
@@ -12,13 +12,13 @@ flags: [async]
var obj = {};
-var p = Promise.reject(obj).then( /*Identity, Thrower*/ )
- .then(function() {
- $DONE("Unexpected fulfillment - promise should reject.");
- }, function(arg) {
- if (arg !== obj) {
- $DONE("Expected reject reason to be obj, actually " + arg);
- return;
- }
- $DONE();
- });
+var p = Promise.reject(obj).then(/*Identity, Thrower*/)
+ .then(function () {
+ $DONE("Unexpected fulfillment - promise should reject.");
+ }, function (arg) {
+ if (arg !== obj) {
+ $DONE("Expected reject reason to be obj, actually " + arg);
+ return;
+ }
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A1.1_T1.js b/test/built-ins/Promise/race/S25.4.4.3_A1.1_T1.js
index 69102cfbd..b92440669 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A1.1_T1.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A1.1_T1.js
@@ -9,5 +9,5 @@ description: Promise.race is callable
---*/
if (typeof Promise.race !== "function") {
- $ERROR("Expected Promise.race to be a function, actually " + typeof Promise.race);
+ $ERROR("Expected Promise.race to be a function, actually " + typeof Promise.race);
}
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A2.1_T1.js b/test/built-ins/Promise/race/S25.4.4.3_A2.1_T1.js
index 2e14c7ead..a3b3fd963 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A2.1_T1.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A2.1_T1.js
@@ -11,5 +11,5 @@ description: Promise.race returns a new promise
var p = Promise.race([]);
if (!(p instanceof Promise)) {
- $ERROR("Expected Promise.race([]) to return a promise.");
+ $ERROR("Expected Promise.race([]) to return a promise.");
}
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A2.2_T1.js b/test/built-ins/Promise/race/S25.4.4.3_A2.2_T1.js
index d53b5da14..87a7c610a 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A2.2_T1.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A2.2_T1.js
@@ -11,10 +11,11 @@ flags: [async]
var nonIterable = 3;
-Promise.race(nonIterable).then(function() {
- $ERROR('Promise unexpectedly fulfilled: Promise.race(nonIterable) should throw TypeError');
-}, function(err) {
- if (!(err instanceof TypeError)) {
- $ERROR('Expected TypeError, got ' + err);
- }
+Promise.race(nonIterable).then(function () {
+ $ERROR('Promise unexpectedly fulfilled: Promise.race(nonIterable) should throw TypeError');
+}, function (err) {
+ if (!(err instanceof TypeError)) {
+ $ERROR('Expected TypeError, got ' + err);
+ }
}).then($DONE, $DONE);
+
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A2.2_T2.js b/test/built-ins/Promise/race/S25.4.4.3_A2.2_T2.js
index 18da6d071..cca930722 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A2.2_T2.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A2.2_T2.js
@@ -9,10 +9,11 @@ description: Promise.race rejects if argument is not object or is non-iterable
flags: [async]
---*/
-Promise.race(new Error("abrupt")).then(function() {
- $ERROR('Promise unexpectedly resolved: Promise.race(abruptCompletion) should throw TypeError');
-}, function(err) {
- if (!(err instanceof TypeError)) {
- $ERROR('Expected TypeError, got ' + err);
- }
+Promise.race(new Error("abrupt")).then(function () {
+ $ERROR('Promise unexpectedly resolved: Promise.race(abruptCompletion) should throw TypeError');
+}, function (err) {
+ if (!(err instanceof TypeError)) {
+ $ERROR('Expected TypeError, got ' + err);
+ }
}).then($DONE, $DONE);
+
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A2.2_T3.js b/test/built-ins/Promise/race/S25.4.4.3_A2.2_T3.js
index 790c51a75..d8aa443f9 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A2.2_T3.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A2.2_T3.js
@@ -15,15 +15,16 @@ flags: [async]
var iterThrows = {};
Object.defineProperty(iterThrows, Symbol.iterator, {
- get: function() {
- throw new Error("abrupt completion");
- }
+ get: function () {
+ throw new Error("abrupt completion");
+ }
});
-Promise.race(iterThrows).then(function() {
- $ERROR('Promise unexpectedly fulfilled: Promise.race(iterThrows) should throw');
-}, function(err) {
- if (!(err instanceof Error)) {
- $ERROR('Expected Promise to be rejected with an error, got ' + err);
- }
+Promise.race(iterThrows).then(function () {
+ $ERROR('Promise unexpectedly fulfilled: Promise.race(iterThrows) should throw');
+}, function (err) {
+ if (!(err instanceof Error)) {
+ $ERROR('Expected Promise to be rejected with an error, got ' + err);
+ }
}).then($DONE, $DONE);
+
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A3.1_T1.js b/test/built-ins/Promise/race/S25.4.4.3_A3.1_T1.js
index b3d90e6fc..21b3a098d 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A3.1_T1.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A3.1_T1.js
@@ -11,7 +11,8 @@ author: Sam Mikes
description: Promise.race throws if 'this' does not conform to Promise constructor
---*/
-function ZeroArgConstructor() {}
+function ZeroArgConstructor() {
+}
assert.throws(TypeError, function() {
Promise.race.call(ZeroArgConstructor, [3]);
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A3.1_T2.js b/test/built-ins/Promise/race/S25.4.4.3_A3.1_T2.js
index 07c20f570..e16e02a03 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A3.1_T2.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A3.1_T2.js
@@ -11,9 +11,7 @@ author: Sam Mikes
description: Promise.race throws TypeError, even on empty array, when 'this' does not conform to Promise constructor
---*/
-function BadPromiseConstructor(f) {
- f(undefined, undefined);
-}
+function BadPromiseConstructor(f) { f(undefined, undefined); }
assert.throws(TypeError, function() {
Promise.race.call(BadPromiseConstructor, []);
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A4.1_T1.js b/test/built-ins/Promise/race/S25.4.4.3_A4.1_T1.js
index 95dde51bd..a325a995b 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A4.1_T1.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A4.1_T1.js
@@ -11,16 +11,17 @@ flags: [async]
var iterThrows = {};
var error = new Test262Error();
-iterThrows[Symbol.iterator] = function() {
- return {
- next: function() {
- throw error;
- }
- };
+iterThrows[Symbol.iterator] = function () {
+ return {
+ next: function () {
+ throw error;
+ }
+ };
};
-Promise.race(iterThrows).then(function() {
- $ERROR('Promise unexpectedly fulfilled: Promise.race(iterThrows) should throw TypeError');
-}, function(reason) {
- assert.sameValue(reason, error);
-}).then($DONE, $DONE);
+Promise.race(iterThrows).then(function () {
+ $ERROR('Promise unexpectedly fulfilled: Promise.race(iterThrows) should throw TypeError');
+}, function (reason) {
+ assert.sameValue(reason, error);
+}).then($DONE,$DONE);
+
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A4.1_T2.js b/test/built-ins/Promise/race/S25.4.4.3_A4.1_T2.js
index cb8912b97..00ac77d1b 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A4.1_T2.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A4.1_T2.js
@@ -11,25 +11,26 @@ flags: [async]
var iterThrows = {};
Object.defineProperty(iterThrows, Symbol.iterator, {
- get: function() {
- return {
- next: function() {
- var v = {};
- Object.defineProperty(v, 'value', {
- get: function() {
- throw new Error("abrupt completion");
- }
- });
- return v;
- }
- };
- }
+ get: function () {
+ return {
+ next: function () {
+ var v = {};
+ Object.defineProperty(v, 'value', {
+ get: function () {
+ throw new Error("abrupt completion");
+ }
+ });
+ return v;
+ }
+ };
+ }
});
-Promise.race(iterThrows).then(function() {
- $ERROR('Promise unexpectedly fulfilled: Promise.race(iterThrows) should throw TypeError');
-}, function(err) {
- if (!(err instanceof TypeError)) {
- $ERROR('Expected TypeError, got ' + err);
- }
-}).then($DONE, $DONE);
+Promise.race(iterThrows).then(function () {
+ $ERROR('Promise unexpectedly fulfilled: Promise.race(iterThrows) should throw TypeError');
+},function (err) {
+ if (!(err instanceof TypeError)) {
+ $ERROR('Expected TypeError, got ' + err);
+ }
+}).then($DONE,$DONE);
+
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A5.1_T1.js b/test/built-ins/Promise/race/S25.4.4.3_A5.1_T1.js
index 2093f8bee..e5b7526fd 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A5.1_T1.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A5.1_T1.js
@@ -10,10 +10,10 @@ flags: [async]
var p = Promise.race([]);
-p.then(function() {
- $ERROR("Never settles.");
-}, function() {
- $ERROR("Never settles.");
+p.then(function () {
+ $ERROR("Never settles.");
+}, function () {
+ $ERROR("Never settles.");
}).then($DONE, $DONE);
// use three 'then's to allow above to settle
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A6.1_T1.js b/test/built-ins/Promise/race/S25.4.4.3_A6.1_T1.js
index 81d6152a4..90c46e37e 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A6.1_T1.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A6.1_T1.js
@@ -15,17 +15,17 @@ var p = Promise.race([1]);
sequence.push(1);
-p.then(function() {
- sequence.push(4);
- checkSequence(sequence, "This happens second");
+p.then(function () {
+ sequence.push(4);
+ checkSequence(sequence, "This happens second");
}).catch($DONE);
-Promise.resolve().then(function() {
- sequence.push(3);
- checkSequence(sequence, "This happens first");
-}).then(function() {
- sequence.push(5);
- checkSequence(sequence, "This happens third");
+Promise.resolve().then(function () {
+ sequence.push(3);
+ checkSequence(sequence, "This happens first");
+}).then(function () {
+ sequence.push(5);
+ checkSequence(sequence, "This happens third");
}).then($DONE, $DONE);
sequence.push(2);
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A6.2_T1.js b/test/built-ins/Promise/race/S25.4.4.3_A6.2_T1.js
index c3e0364b3..b28ccdb51 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A6.2_T1.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A6.2_T1.js
@@ -12,23 +12,23 @@ flags: [async]
var sequence = [];
var p1 = Promise.reject(1),
- p = Promise.race([p1]);
+ p = Promise.race([p1]);
sequence.push(1);
-p.then(function() {
- $ERROR("Should not fulfill.");
-}, function() {
- sequence.push(4);
- checkSequence(sequence, "This happens second");
+p.then(function () {
+ $ERROR("Should not fulfill.");
+}, function () {
+ sequence.push(4);
+ checkSequence(sequence, "This happens second");
}).catch($DONE);
-Promise.resolve().then(function() {
- sequence.push(3);
- checkSequence(sequence, "This happens first");
-}).then(function() {
- sequence.push(5);
- checkSequence(sequence, "This happens third");
+Promise.resolve().then(function () {
+ sequence.push(3);
+ checkSequence(sequence, "This happens first");
+}).then(function () {
+ sequence.push(5);
+ checkSequence(sequence, "This happens third");
}).then($DONE, $DONE);
sequence.push(2);
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A7.1_T1.js b/test/built-ins/Promise/race/S25.4.4.3_A7.1_T1.js
index ada1fba26..517df57b3 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A7.1_T1.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A7.1_T1.js
@@ -12,26 +12,26 @@ flags: [async]
var sequence = [];
var p1 = Promise.resolve(1),
- p2 = Promise.resolve(2),
- p = Promise.race([p1, p2]);
+ p2 = Promise.resolve(2),
+ p = Promise.race([p1, p2]);
sequence.push(1);
-p.then(function(arg) {
- if (arg !== 1) {
- $ERROR("Expected promise to be fulfilled with 1, got " + arg);
- }
+p.then(function (arg) {
+ if (arg !== 1) {
+ $ERROR("Expected promise to be fulfilled with 1, got " + arg);
+ }
- sequence.push(4);
- checkSequence(sequence, "This happens second");
+ sequence.push(4);
+ checkSequence(sequence, "This happens second");
}).catch($DONE);
-Promise.resolve().then(function() {
- sequence.push(3);
- checkSequence(sequence, "This happens first");
-}).then(function() {
- sequence.push(5);
- checkSequence(sequence, "This happens third");
+Promise.resolve().then(function () {
+ sequence.push(3);
+ checkSequence(sequence, "This happens first");
+}).then(function () {
+ sequence.push(5);
+ checkSequence(sequence, "This happens third");
}).then($DONE, $DONE);
sequence.push(2);
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A7.1_T2.js b/test/built-ins/Promise/race/S25.4.4.3_A7.1_T2.js
index 2b2dbc962..f0f12a4e5 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A7.1_T2.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A7.1_T2.js
@@ -12,26 +12,26 @@ flags: [async]
var sequence = [];
var p1 = Promise.resolve(1),
- p2 = new Promise(function() {}),
- p = Promise.race([p1, p2]);
+ p2 = new Promise(function () {}),
+ p = Promise.race([p1, p2]);
sequence.push(1);
-p.then(function(arg) {
- if (arg !== 1) {
- $ERROR("Expected promise to be fulfilled with 1, got " + arg);
- }
+p.then(function (arg) {
+ if (arg !== 1) {
+ $ERROR("Expected promise to be fulfilled with 1, got " + arg);
+ }
- sequence.push(4);
- checkSequence(sequence, "This happens second");
+ sequence.push(4);
+ checkSequence(sequence, "This happens second");
}).catch($DONE);
-Promise.resolve().then(function() {
- sequence.push(3);
- checkSequence(sequence, "This happens first");
-}).then(function() {
- sequence.push(5);
- checkSequence(sequence, "This happens third");
+Promise.resolve().then(function () {
+ sequence.push(3);
+ checkSequence(sequence, "This happens first");
+}).then(function () {
+ sequence.push(5);
+ checkSequence(sequence, "This happens third");
}).then($DONE, $DONE);
sequence.push(2);
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A7.1_T3.js b/test/built-ins/Promise/race/S25.4.4.3_A7.1_T3.js
index 4e03609a1..7e0f286c8 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A7.1_T3.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A7.1_T3.js
@@ -11,27 +11,27 @@ flags: [async]
var sequence = [];
-var p1 = new Promise(function() {}),
- p2 = Promise.resolve(2),
- p = Promise.race([p1, p2]);
+var p1 = new Promise(function () {}),
+ p2 = Promise.resolve(2),
+ p = Promise.race([p1, p2]);
sequence.push(1);
-p.then(function(arg) {
- if (arg !== 2) {
- $ERROR("Expected promise to be fulfilled with 2, got " + arg);
- }
+p.then(function (arg) {
+ if (arg !== 2) {
+ $ERROR("Expected promise to be fulfilled with 2, got " + arg);
+ }
- sequence.push(4);
- checkSequence(sequence, "This happens second");
+ sequence.push(4);
+ checkSequence(sequence, "This happens second");
}).catch($DONE);
-Promise.resolve().then(function() {
- sequence.push(3);
- checkSequence(sequence, "This happens first");
-}).then(function() {
- sequence.push(5);
- checkSequence(sequence, "This happens third");
+Promise.resolve().then(function () {
+ sequence.push(3);
+ checkSequence(sequence, "This happens first");
+}).then(function () {
+ sequence.push(5);
+ checkSequence(sequence, "This happens third");
}).then($DONE, $DONE);
sequence.push(2);
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A7.2_T1.js b/test/built-ins/Promise/race/S25.4.4.3_A7.2_T1.js
index 2f9d3cb67..3f24b602d 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A7.2_T1.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A7.2_T1.js
@@ -12,28 +12,28 @@ flags: [async]
var sequence = [];
var p1 = Promise.reject(1),
- p2 = Promise.resolve(2),
- p = Promise.race([p1, p2]);
+ p2 = Promise.resolve(2),
+ p = Promise.race([p1, p2]);
sequence.push(1);
-p.then(function() {
- $ERROR("Should not be fulfilled - expected rejection.");
-}, function(arg) {
- if (arg !== 1) {
- $ERROR("Expected rejection reason to be 1, got " + arg);
- }
+p.then(function () {
+ $ERROR("Should not be fulfilled - expected rejection.");
+}, function (arg) {
+ if (arg !== 1) {
+ $ERROR("Expected rejection reason to be 1, got " + arg);
+ }
- sequence.push(4);
- checkSequence(sequence, "This happens second");
+ sequence.push(4);
+ checkSequence(sequence, "This happens second");
}).catch($DONE);
-Promise.resolve().then(function() {
- sequence.push(3);
- checkSequence(sequence, "This happens first");
-}).then(function() {
- sequence.push(5);
- checkSequence(sequence, "This happens third");
+Promise.resolve().then(function () {
+ sequence.push(3);
+ checkSequence(sequence, "This happens first");
+}).then(function () {
+ sequence.push(5);
+ checkSequence(sequence, "This happens third");
}).then($DONE, $DONE);
sequence.push(2);
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A7.3_T1.js b/test/built-ins/Promise/race/S25.4.4.3_A7.3_T1.js
index 7628a4664..02dad7f9d 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A7.3_T1.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A7.3_T1.js
@@ -9,18 +9,14 @@ flags: [async]
---*/
var resolveP1, rejectP2,
- p1 = new Promise(function(resolve) {
- resolveP1 = resolve;
- }),
- p2 = new Promise(function(resolve, reject) {
- rejectP2 = reject;
- });
+ p1 = new Promise(function (resolve) { resolveP1 = resolve; }),
+ p2 = new Promise(function (resolve, reject) { rejectP2 = reject; });
rejectP2(new Error("Promise.race should not see this if P1 already resolved"));
resolveP1(1);
-Promise.race([p1, p2]).then(function(arg) {
- if (arg !== 1) {
- $ERROR("Expected fulfillment with 1, got " + arg);
- }
+Promise.race([p1, p2]).then(function (arg) {
+ if (arg !== 1) {
+ $ERROR("Expected fulfillment with 1, got " + arg);
+ }
}).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/race/S25.4.4.3_A7.3_T2.js b/test/built-ins/Promise/race/S25.4.4.3_A7.3_T2.js
index 91803cce5..535116ea1 100644
--- a/test/built-ins/Promise/race/S25.4.4.3_A7.3_T2.js
+++ b/test/built-ins/Promise/race/S25.4.4.3_A7.3_T2.js
@@ -9,20 +9,17 @@ flags: [async]
---*/
var resolveP1, rejectP2,
- p1 = new Promise(function(resolve) {
- resolveP1 = resolve;
- }),
- p2 = new Promise(function(resolve, reject) {
- rejectP2 = reject;
- });
+ p1 = new Promise(function (resolve) { resolveP1 = resolve; }),
+ p2 = new Promise(function (resolve, reject) { rejectP2 = reject; });
-Promise.race([p1, p2]).then(function() {
- $ERROR("Should not be fulfilled: expected rejection.");
-}, function(arg) {
- if (arg !== 2) {
- $ERROR("Expected rejection reason to be 2, got " + arg);
- }
+Promise.race([p1, p2]).then(function () {
+ $ERROR("Should not be fulfilled: expected rejection.");
+}, function (arg) {
+ if (arg !== 2) {
+ $ERROR("Expected rejection reason to be 2, got " + arg);
+ }
}).then($DONE, $DONE);
rejectP2(2);
resolveP1(1);
+
diff --git a/test/built-ins/Promise/race/capability-executor-called-twice.js b/test/built-ins/Promise/race/capability-executor-called-twice.js
index 652f3201c..7e21ce01e 100644
--- a/test/built-ins/Promise/race/capability-executor-called-twice.js
+++ b/test/built-ins/Promise/race/capability-executor-called-twice.js
@@ -27,7 +27,7 @@ Promise.race.call(function(executor) {
checkPoint += "a";
executor();
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, []);
assert.sameValue(checkPoint, "abc", "executor initially called with no arguments");
@@ -37,7 +37,7 @@ Promise.race.call(function(executor) {
checkPoint += "a";
executor(undefined, undefined);
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, []);
assert.sameValue(checkPoint, "abc", "executor initially called with (undefined, undefined)");
@@ -46,9 +46,9 @@ var checkPoint = "";
assert.throws(TypeError, function() {
Promise.race.call(function(executor) {
checkPoint += "a";
- executor(undefined, function() {});
+ executor(undefined, function(){});
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, []);
}, "executor initially called with (undefined, function)");
@@ -58,9 +58,9 @@ var checkPoint = "";
assert.throws(TypeError, function() {
Promise.race.call(function(executor) {
checkPoint += "a";
- executor(function() {}, undefined);
+ executor(function(){}, undefined);
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, []);
}, "executor initially called with (function, undefined)");
@@ -72,7 +72,7 @@ assert.throws(TypeError, function() {
checkPoint += "a";
executor("invalid value", 123);
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, []);
}, "executor initially called with (String, Number)");
diff --git a/test/built-ins/Promise/race/capability-executor-not-callable.js b/test/built-ins/Promise/race/capability-executor-not-callable.js
index ae52d9c10..be31cf297 100644
--- a/test/built-ins/Promise/race/capability-executor-not-callable.js
+++ b/test/built-ins/Promise/race/capability-executor-not-callable.js
@@ -56,7 +56,7 @@ var checkPoint = "";
assert.throws(TypeError, function() {
Promise.race.call(function(executor) {
checkPoint += "a";
- executor(undefined, function() {});
+ executor(undefined, function(){});
checkPoint += "b";
}, []);
}, "executor called with (undefined, function)");
@@ -66,7 +66,7 @@ var checkPoint = "";
assert.throws(TypeError, function() {
Promise.race.call(function(executor) {
checkPoint += "a";
- executor(function() {}, undefined);
+ executor(function(){}, undefined);
checkPoint += "b";
}, []);
}, "executor called with (function, undefined)");
diff --git a/test/built-ins/Promise/race/invoke-resolve-error-close.js b/test/built-ins/Promise/race/invoke-resolve-error-close.js
index df90989cb..36651be4e 100644
--- a/test/built-ins/Promise/race/invoke-resolve-error-close.js
+++ b/test/built-ins/Promise/race/invoke-resolve-error-close.js
@@ -29,10 +29,7 @@ var returnCount = 0;
iterDoneSpy[Symbol.iterator] = function() {
return {
next: function() {
- return {
- value: null,
- done: false
- };
+ return { value: null, done: false };
},
return: function() {
returnCount += 1;
diff --git a/test/built-ins/Promise/race/invoke-resolve-get-error-close.js b/test/built-ins/Promise/race/invoke-resolve-get-error-close.js
index cc874421c..d2958b5b3 100644
--- a/test/built-ins/Promise/race/invoke-resolve-get-error-close.js
+++ b/test/built-ins/Promise/race/invoke-resolve-get-error-close.js
@@ -29,9 +29,7 @@ var returnCount = 0;
iter[Symbol.iterator] = function() {
return {
next: function() {
- return {
- done: false
- };
+ return { done: false };
},
return: function() {
returnCount += 1;
diff --git a/test/built-ins/Promise/race/invoke-then-error-close.js b/test/built-ins/Promise/race/invoke-then-error-close.js
index 07d80abab..a9df84f49 100644
--- a/test/built-ins/Promise/race/invoke-then-error-close.js
+++ b/test/built-ins/Promise/race/invoke-then-error-close.js
@@ -31,10 +31,7 @@ var returnCount = 0;
iter[Symbol.iterator] = function() {
return {
next: function() {
- return {
- done: false,
- value: promise
- };
+ return { done: false, value: promise };
},
return: function() {
returnCount += 1;
diff --git a/test/built-ins/Promise/race/invoke-then-get-error-close.js b/test/built-ins/Promise/race/invoke-then-get-error-close.js
index 9dbb52017..93f095ee2 100644
--- a/test/built-ins/Promise/race/invoke-then-get-error-close.js
+++ b/test/built-ins/Promise/race/invoke-then-get-error-close.js
@@ -30,10 +30,7 @@ var returnCount = 0;
iter[Symbol.iterator] = function() {
return {
next: function() {
- return {
- done: false,
- value: promise
- };
+ return { done: false, value: promise };
},
return: function() {
returnCount += 1;
diff --git a/test/built-ins/Promise/race/reject-deferred.js b/test/built-ins/Promise/race/reject-deferred.js
index c7e321a36..59f891510 100644
--- a/test/built-ins/Promise/race/reject-deferred.js
+++ b/test/built-ins/Promise/race/reject-deferred.js
@@ -24,9 +24,7 @@ flags: [async]
var thenable = {
then: function(_, reject) {
- new Promise(function(resolve) {
- resolve();
- })
+ new Promise(function(resolve) { resolve(); })
.then(function() {
reject();
});
diff --git a/test/built-ins/Promise/race/reject-ignored-deferred.js b/test/built-ins/Promise/race/reject-ignored-deferred.js
index 43df80e3f..c64b70da4 100644
--- a/test/built-ins/Promise/race/reject-ignored-deferred.js
+++ b/test/built-ins/Promise/race/reject-ignored-deferred.js
@@ -29,9 +29,7 @@ flags: [async]
var fulfiller = {
then: function(resolve) {
- new Promise(function(resolve) {
- resolve();
- })
+ new Promise(function(resolve) { resolve(); })
.then(function() {
resolve();
});
@@ -39,9 +37,7 @@ var fulfiller = {
};
var rejector = {
then: function(_, reject) {
- new Promise(function(resolve) {
- resolve();
- })
+ new Promise(function(resolve) { resolve(); })
.then(function() {
reject();
});
diff --git a/test/built-ins/Promise/race/resolve-prms-cstm-then.js b/test/built-ins/Promise/race/resolve-prms-cstm-then.js
index 07c6317a2..238785a50 100644
--- a/test/built-ins/Promise/race/resolve-prms-cstm-then.js
+++ b/test/built-ins/Promise/race/resolve-prms-cstm-then.js
@@ -35,9 +35,7 @@ var thenableValue = {
resolve(value);
}
};
-var thenable = new Promise(function(resolve) {
- resolve();
-});
+var thenable = new Promise(function(resolve) { resolve(); });
thenable.then = function(resolve) {
resolve(thenableValue);
diff --git a/test/built-ins/Promise/race/resolve-self.js b/test/built-ins/Promise/race/resolve-self.js
index 565bc94e5..6fc2a3820 100644
--- a/test/built-ins/Promise/race/resolve-self.js
+++ b/test/built-ins/Promise/race/resolve-self.js
@@ -33,9 +33,7 @@ var thenable = {
};
try {
- Promise.resolve = function(v) {
- return v;
- };
+ Promise.resolve = function(v) { return v; };
self = Promise.race([thenable]);
} finally {
Promise.resolve = builtinResolve;
@@ -44,15 +42,15 @@ try {
resolve(self);
self.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(value) {
- if (!value) {
- $DONE('The promise should be rejected with a value.');
- return;
- }
- if (value.constructor !== TypeError) {
- $DONE('The promise should be rejected with a TypeError instance.');
- return;
- }
- $DONE();
-});
+ $DONE('The promise should not be fulfilled.');
+ }, function(value) {
+ if (!value) {
+ $DONE('The promise should be rejected with a value.');
+ return;
+ }
+ if (value.constructor !== TypeError) {
+ $DONE('The promise should be rejected with a TypeError instance.');
+ return;
+ }
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/race/same-reject-function.js b/test/built-ins/Promise/race/same-reject-function.js
index b67e4ff41..dbcdf7c5b 100644
--- a/test/built-ins/Promise/race/same-reject-function.js
+++ b/test/built-ins/Promise/race/same-reject-function.js
@@ -13,17 +13,14 @@ info: |
...
---*/
-function rejectFunction() {}
+function rejectFunction() { }
function Constructor(executor) {
executor($ERROR, rejectFunction);
}
-Constructor.resolve = function(v) {
- return v;
-};
+Constructor.resolve = function(v) { return v; };
-var callCount1 = 0,
- callCount2 = 0;
+var callCount1 = 0, callCount2 = 0;
var p1 = {
then: function(onFulfilled, onRejected) {
diff --git a/test/built-ins/Promise/race/same-resolve-function.js b/test/built-ins/Promise/race/same-resolve-function.js
index 10b6bfec6..b20ee7242 100644
--- a/test/built-ins/Promise/race/same-resolve-function.js
+++ b/test/built-ins/Promise/race/same-resolve-function.js
@@ -13,17 +13,14 @@ info: |
...
---*/
-function resolveFunction() {}
+function resolveFunction() { }
function Constructor(executor) {
executor(resolveFunction, $ERROR);
}
-Constructor.resolve = function(v) {
- return v;
-};
+Constructor.resolve = function(v) { return v; };
-var callCount1 = 0,
- callCount2 = 0;
+var callCount1 = 0, callCount2 = 0;
var p1 = {
then: function(onFulfilled, onRejected) {
diff --git a/test/built-ins/Promise/race/species-get-error.js b/test/built-ins/Promise/race/species-get-error.js
index b32fd7ef4..26e2fd039 100644
--- a/test/built-ins/Promise/race/species-get-error.js
+++ b/test/built-ins/Promise/race/species-get-error.js
@@ -14,7 +14,7 @@ features: [Symbol.species]
---*/
function C(executor) {
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
}
Object.defineProperty(C, Symbol.species, {
get: function() {
diff --git a/test/built-ins/Promise/reject-function-nonconstructor.js b/test/built-ins/Promise/reject-function-nonconstructor.js
index cf77ab828..752a7c9e1 100644
--- a/test/built-ins/Promise/reject-function-nonconstructor.js
+++ b/test/built-ins/Promise/reject-function-nonconstructor.js
@@ -17,6 +17,4 @@ new Promise(function(resolve, reject) {
});
assert.sameValue(Object.prototype.hasOwnProperty.call(rejectFunction, "prototype"), false);
-assert.throws(TypeError, function() {
- new rejectFunction();
-});
+assert.throws(TypeError, function() { new rejectFunction(); });
diff --git a/test/built-ins/Promise/reject-ignored-via-abrupt.js b/test/built-ins/Promise/reject-ignored-via-abrupt.js
index 9e5a978b4..3e0855acf 100644
--- a/test/built-ins/Promise/reject-ignored-via-abrupt.js
+++ b/test/built-ins/Promise/reject-ignored-via-abrupt.js
@@ -28,7 +28,7 @@ var p = new Promise(function(resolve) {
});
p.then(function() {
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/reject-ignored-via-fn-deferred.js b/test/built-ins/Promise/reject-ignored-via-fn-deferred.js
index b272e50f0..90cdaaa5c 100644
--- a/test/built-ins/Promise/reject-ignored-via-fn-deferred.js
+++ b/test/built-ins/Promise/reject-ignored-via-fn-deferred.js
@@ -30,10 +30,10 @@ var p = new Promise(function(_resolve, _reject) {
});
p.then(function() {
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
resolve();
returnValue = reject(thenable);
diff --git a/test/built-ins/Promise/reject-ignored-via-fn-immed.js b/test/built-ins/Promise/reject-ignored-via-fn-immed.js
index d9a5018af..118c0b448 100644
--- a/test/built-ins/Promise/reject-ignored-via-fn-immed.js
+++ b/test/built-ins/Promise/reject-ignored-via-fn-immed.js
@@ -31,7 +31,7 @@ var p = new Promise(function(resolve, reject) {
assert.sameValue(returnValue, undefined, '"reject" function return value');
p.then(function() {
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/reject-via-abrupt-queue.js b/test/built-ins/Promise/reject-via-abrupt-queue.js
index c4194c4a8..b4a6e556a 100644
--- a/test/built-ins/Promise/reject-via-abrupt-queue.js
+++ b/test/built-ins/Promise/reject-via-abrupt-queue.js
@@ -42,13 +42,13 @@ var p = new Promise(function() {
});
p.then(function() {
- $DONE('The promise should not be fulfilled.');
-}).then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(x) {
- if (x !== thenable) {
- $DONE('The promise should be rejected with the resolution value.');
- return;
- }
- $DONE();
-});
+ $DONE('The promise should not be fulfilled.');
+ }).then(function() {
+ $DONE('The promise should not be fulfilled.');
+ }, function(x) {
+ if (x !== thenable) {
+ $DONE('The promise should be rejected with the resolution value.');
+ return;
+ }
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/reject-via-abrupt.js b/test/built-ins/Promise/reject-via-abrupt.js
index c51a6f177..71be43108 100644
--- a/test/built-ins/Promise/reject-via-abrupt.js
+++ b/test/built-ins/Promise/reject-via-abrupt.js
@@ -25,12 +25,12 @@ var p = new Promise(function() {
});
p.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(x) {
- if (x !== thenable) {
- $DONE('The promise should be rejected with the resolution value.');
- return;
- }
+ $DONE('The promise should not be fulfilled.');
+ }, function(x) {
+ if (x !== thenable) {
+ $DONE('The promise should be rejected with the resolution value.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/reject-via-fn-deferred-queue.js b/test/built-ins/Promise/reject-via-fn-deferred-queue.js
index 12bdde783..9bd28ff33 100644
--- a/test/built-ins/Promise/reject-via-fn-deferred-queue.js
+++ b/test/built-ins/Promise/reject-via-fn-deferred-queue.js
@@ -45,17 +45,17 @@ var p = new Promise(function(_, _reject) {
});
p.then(function() {
- $DONE('The promise should not be fulfilled.');
-}).then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(x) {
- if (x !== thenable) {
- $DONE('The promise should be rejected with the resolution value.');
- return;
- }
-
- $DONE();
-});
+ $DONE('The promise should not be fulfilled.');
+ }).then(function() {
+ $DONE('The promise should not be fulfilled.');
+ }, function(x) {
+ if (x !== thenable) {
+ $DONE('The promise should be rejected with the resolution value.');
+ return;
+ }
+
+ $DONE();
+ });
returnValue = reject(thenable);
diff --git a/test/built-ins/Promise/reject-via-fn-deferred.js b/test/built-ins/Promise/reject-via-fn-deferred.js
index 1d1576a1c..24333fb0f 100644
--- a/test/built-ins/Promise/reject-via-fn-deferred.js
+++ b/test/built-ins/Promise/reject-via-fn-deferred.js
@@ -25,15 +25,15 @@ var p = new Promise(function(_, _reject) {
});
p.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(x) {
- if (x !== thenable) {
- $DONE('The promise should be rejected with the resolution value.');
- return;
- }
+ $DONE('The promise should not be fulfilled.');
+ }, function(x) {
+ if (x !== thenable) {
+ $DONE('The promise should be rejected with the resolution value.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
returnValue = reject(thenable);
diff --git a/test/built-ins/Promise/reject-via-fn-immed-queue.js b/test/built-ins/Promise/reject-via-fn-immed-queue.js
index e48cbe002..3c83ea5ca 100644
--- a/test/built-ins/Promise/reject-via-fn-immed-queue.js
+++ b/test/built-ins/Promise/reject-via-fn-immed-queue.js
@@ -46,14 +46,14 @@ var p = new Promise(function(_, reject) {
assert.sameValue(returnValue, undefined, '"reject" function return value');
p.then(function() {
- $DONE('The promise should not be fulfilled.');
-}).then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(x) {
- if (x !== thenable) {
- $DONE('The promise should be rejected with the resolution value.');
- return;
- }
-
- $DONE();
-});
+ $DONE('The promise should not be fulfilled.');
+ }).then(function() {
+ $DONE('The promise should not be fulfilled.');
+ }, function(x) {
+ if (x !== thenable) {
+ $DONE('The promise should be rejected with the resolution value.');
+ return;
+ }
+
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/reject-via-fn-immed.js b/test/built-ins/Promise/reject-via-fn-immed.js
index 90573149a..eec1b98df 100644
--- a/test/built-ins/Promise/reject-via-fn-immed.js
+++ b/test/built-ins/Promise/reject-via-fn-immed.js
@@ -26,12 +26,12 @@ var p = new Promise(function(_, reject) {
assert.sameValue(returnValue, undefined, '"reject" function return value');
p.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(x) {
- if (x !== thenable) {
- $DONE('The promise should be rejected with the resolution value.');
- return;
- }
+ $DONE('The promise should not be fulfilled.');
+ }, function(x) {
+ if (x !== thenable) {
+ $DONE('The promise should be rejected with the resolution value.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/reject/S25.4.4.4_A1.1_T1.js b/test/built-ins/Promise/reject/S25.4.4.4_A1.1_T1.js
index 469656417..95decca57 100644
--- a/test/built-ins/Promise/reject/S25.4.4.4_A1.1_T1.js
+++ b/test/built-ins/Promise/reject/S25.4.4.4_A1.1_T1.js
@@ -10,5 +10,5 @@ description: Promise.reject is a function
---*/
if ((typeof Promise.reject) !== "function") {
- $ERROR("Expected Promise.reject to be a function");
+ $ERROR("Expected Promise.reject to be a function");
}
diff --git a/test/built-ins/Promise/reject/S25.4.4.4_A2.1_T1.js b/test/built-ins/Promise/reject/S25.4.4.4_A2.1_T1.js
index cf83e8bcf..6bd6b5f9f 100644
--- a/test/built-ins/Promise/reject/S25.4.4.4_A2.1_T1.js
+++ b/test/built-ins/Promise/reject/S25.4.4.4_A2.1_T1.js
@@ -19,13 +19,13 @@ flags: [async]
var p = Promise.reject(3);
if (!(p instanceof Promise)) {
- $ERROR("Expected Promise.reject to return a promise.");
+ $ERROR("Expected Promise.reject to return a promise.");
}
-p.then(function() {
- $ERROR("Promise should not be fulfilled.");
-}, function(arg) {
- if (arg !== 3) {
- $ERROR("Expected promise to be rejected with supplied arg, got " + arg);
- }
+p.then(function () {
+ $ERROR("Promise should not be fulfilled.");
+}, function (arg) {
+ if (arg !== 3) {
+ $ERROR("Expected promise to be rejected with supplied arg, got " + arg);
+ }
}).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/reject/S25.4.4.4_A3.1_T1.js b/test/built-ins/Promise/reject/S25.4.4.4_A3.1_T1.js
index 0f9fdc394..47fb6d93a 100644
--- a/test/built-ins/Promise/reject/S25.4.4.4_A3.1_T1.js
+++ b/test/built-ins/Promise/reject/S25.4.4.4_A3.1_T1.js
@@ -9,7 +9,8 @@ author: Sam Mikes
description: Promise.reject throws TypeError for bad 'this'
---*/
-function ZeroArgConstructor() {}
+function ZeroArgConstructor() {
+}
assert.throws(TypeError, function() {
Promise.reject.call(ZeroArgConstructor, 4);
diff --git a/test/built-ins/Promise/reject/capability-executor-called-twice.js b/test/built-ins/Promise/reject/capability-executor-called-twice.js
index f1632f40f..0fc52baa2 100644
--- a/test/built-ins/Promise/reject/capability-executor-called-twice.js
+++ b/test/built-ins/Promise/reject/capability-executor-called-twice.js
@@ -27,7 +27,7 @@ Promise.reject.call(function(executor) {
checkPoint += "a";
executor();
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, {});
assert.sameValue(checkPoint, "abc", "executor initially called with no arguments");
@@ -37,7 +37,7 @@ Promise.reject.call(function(executor) {
checkPoint += "a";
executor(undefined, undefined);
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, {});
assert.sameValue(checkPoint, "abc", "executor initially called with (undefined, undefined)");
@@ -46,9 +46,9 @@ var checkPoint = "";
assert.throws(TypeError, function() {
Promise.reject.call(function(executor) {
checkPoint += "a";
- executor(undefined, function() {});
+ executor(undefined, function(){});
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, {});
}, "executor initially called with (undefined, function)");
@@ -58,9 +58,9 @@ var checkPoint = "";
assert.throws(TypeError, function() {
Promise.reject.call(function(executor) {
checkPoint += "a";
- executor(function() {}, undefined);
+ executor(function(){}, undefined);
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, {});
}, "executor initially called with (function, undefined)");
@@ -72,7 +72,7 @@ assert.throws(TypeError, function() {
checkPoint += "a";
executor("invalid value", 123);
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, {});
}, "executor initially called with (String, Number)");
diff --git a/test/built-ins/Promise/reject/capability-executor-not-callable.js b/test/built-ins/Promise/reject/capability-executor-not-callable.js
index 42e0978e7..8aa286ba8 100644
--- a/test/built-ins/Promise/reject/capability-executor-not-callable.js
+++ b/test/built-ins/Promise/reject/capability-executor-not-callable.js
@@ -56,7 +56,7 @@ var checkPoint = "";
assert.throws(TypeError, function() {
Promise.reject.call(function(executor) {
checkPoint += "a";
- executor(undefined, function() {});
+ executor(undefined, function(){});
checkPoint += "b";
}, {});
}, "executor called with (undefined, function)");
@@ -66,7 +66,7 @@ var checkPoint = "";
assert.throws(TypeError, function() {
Promise.reject.call(function(executor) {
checkPoint += "a";
- executor(function() {}, undefined);
+ executor(function(){}, undefined);
checkPoint += "b";
}, {});
}, "executor called with (function, undefined)");
diff --git a/test/built-ins/Promise/reject/capability-invocation.js b/test/built-ins/Promise/reject/capability-invocation.js
index 9fc397676..3a9c6891a 100644
--- a/test/built-ins/Promise/reject/capability-invocation.js
+++ b/test/built-ins/Promise/reject/capability-invocation.js
@@ -17,9 +17,7 @@ info: |
7. ReturnIfAbrupt(promise).
---*/
-var expectedThis = (function() {
- return this;
-})();
+var expectedThis = (function() { return this; })();
var resolveCount = 0;
var thisValue, args;
var P = function(executor) {
diff --git a/test/built-ins/Promise/resolve-function-nonconstructor.js b/test/built-ins/Promise/resolve-function-nonconstructor.js
index 5603b8010..32e89382a 100644
--- a/test/built-ins/Promise/resolve-function-nonconstructor.js
+++ b/test/built-ins/Promise/resolve-function-nonconstructor.js
@@ -17,6 +17,4 @@ new Promise(function(resolve, reject) {
});
assert.sameValue(Object.prototype.hasOwnProperty.call(resolveFunction, "prototype"), false);
-assert.throws(TypeError, function() {
- new resolveFunction();
-});
+assert.throws(TypeError, function() { new resolveFunction(); });
diff --git a/test/built-ins/Promise/resolve-ignored-via-fn-deferred.js b/test/built-ins/Promise/resolve-ignored-via-fn-deferred.js
index a78396daf..8bdd314e4 100644
--- a/test/built-ins/Promise/resolve-ignored-via-fn-deferred.js
+++ b/test/built-ins/Promise/resolve-ignored-via-fn-deferred.js
@@ -31,10 +31,10 @@ var p = new Promise(function(_resolve, _reject) {
});
p.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function() {
- $DONE();
-});
+ $DONE('The promise should not be fulfilled.');
+ }, function() {
+ $DONE();
+ });
reject(thenable);
returnValue = resolve();
diff --git a/test/built-ins/Promise/resolve-ignored-via-fn-immed.js b/test/built-ins/Promise/resolve-ignored-via-fn-immed.js
index 7c5eefb26..2b5cafbf8 100644
--- a/test/built-ins/Promise/resolve-ignored-via-fn-immed.js
+++ b/test/built-ins/Promise/resolve-ignored-via-fn-immed.js
@@ -32,7 +32,7 @@ var p = new Promise(function(resolve, reject) {
assert.sameValue(returnValue, undefined, '"reject" function return value');
p.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function() {
- $DONE();
-});
+ $DONE('The promise should not be fulfilled.');
+ }, function() {
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/resolve-non-obj-deferred.js b/test/built-ins/Promise/resolve-non-obj-deferred.js
index 36a380b0e..4cd93b663 100644
--- a/test/built-ins/Promise/resolve-non-obj-deferred.js
+++ b/test/built-ins/Promise/resolve-non-obj-deferred.js
@@ -23,15 +23,15 @@ var promise = new Promise(function(_resolve) {
});
promise.then(function(value) {
- if (value !== 45) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (value !== 45) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
returnValue = resolve(45);
diff --git a/test/built-ins/Promise/resolve-non-obj-immed.js b/test/built-ins/Promise/resolve-non-obj-immed.js
index 3bb74c10b..b9400d266 100644
--- a/test/built-ins/Promise/resolve-non-obj-immed.js
+++ b/test/built-ins/Promise/resolve-non-obj-immed.js
@@ -23,12 +23,12 @@ var promise = new Promise(function(resolve) {
assert.sameValue(returnValue, undefined, '"resolve" return value');
promise.then(function(value) {
- if (value !== 45) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (value !== 45) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/resolve-non-thenable-deferred.js b/test/built-ins/Promise/resolve-non-thenable-deferred.js
index e760edb11..d39c04bbe 100644
--- a/test/built-ins/Promise/resolve-non-thenable-deferred.js
+++ b/test/built-ins/Promise/resolve-non-thenable-deferred.js
@@ -22,24 +22,22 @@ flags: [async]
---*/
var returnValue = null;
-var nonThenable = {
- then: null
-};
+var nonThenable = { then: null };
var resolve;
var promise = new Promise(function(_resolve) {
resolve = _resolve;
});
promise.then(function(value) {
- if (value !== nonThenable) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (value !== nonThenable) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
returnValue = resolve(nonThenable);
diff --git a/test/built-ins/Promise/resolve-non-thenable-immed.js b/test/built-ins/Promise/resolve-non-thenable-immed.js
index 1c2463a8b..5f7b13b67 100644
--- a/test/built-ins/Promise/resolve-non-thenable-immed.js
+++ b/test/built-ins/Promise/resolve-non-thenable-immed.js
@@ -22,9 +22,7 @@ flags: [async]
---*/
var returnValue = null;
-var nonThenable = {
- then: null
-};
+var nonThenable = { then: null };
var promise = new Promise(function(resolve) {
returnValue = resolve(nonThenable);
});
@@ -32,12 +30,12 @@ var promise = new Promise(function(resolve) {
assert.sameValue(returnValue, undefined, '"resolve" return value');
promise.then(function(value) {
- if (value !== nonThenable) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (value !== nonThenable) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/resolve-poisoned-then-deferred.js b/test/built-ins/Promise/resolve-poisoned-then-deferred.js
index 2b2a3419b..ad3239355 100644
--- a/test/built-ins/Promise/resolve-poisoned-then-deferred.js
+++ b/test/built-ins/Promise/resolve-poisoned-then-deferred.js
@@ -30,15 +30,15 @@ var promise = new Promise(function(_resolve) {
});
promise.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(val) {
- if (val !== value) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ $DONE('The promise should not be fulfilled.');
+ }, function(val) {
+ if (val !== value) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
returnValue = resolve(poisonedThen);
diff --git a/test/built-ins/Promise/resolve-poisoned-then-immed.js b/test/built-ins/Promise/resolve-poisoned-then-immed.js
index cb7d4c29c..22658f20a 100644
--- a/test/built-ins/Promise/resolve-poisoned-then-immed.js
+++ b/test/built-ins/Promise/resolve-poisoned-then-immed.js
@@ -31,12 +31,12 @@ var promise = new Promise(function(resolve) {
assert.sameValue(returnValue, undefined, '"resolve" return value');
promise.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(val) {
- if (val !== value) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ $DONE('The promise should not be fulfilled.');
+ }, function(val) {
+ if (val !== value) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/resolve-prms-cstm-then-deferred.js b/test/built-ins/Promise/resolve-prms-cstm-then-deferred.js
index 542df5b65..d167f2a8e 100644
--- a/test/built-ins/Promise/resolve-prms-cstm-then-deferred.js
+++ b/test/built-ins/Promise/resolve-prms-cstm-then-deferred.js
@@ -27,9 +27,7 @@ flags: [async]
var returnValue = null;
var value = {};
var resolve;
-var thenable = new Promise(function(resolve) {
- resolve();
-});
+var thenable = new Promise(function(resolve) { resolve(); });
var promise = new Promise(function(_resolve) {
resolve = _resolve;
});
@@ -39,15 +37,15 @@ thenable.then = function(resolve) {
};
promise.then(function(val) {
- if (val !== value) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (val !== value) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
returnValue = resolve(thenable);
diff --git a/test/built-ins/Promise/resolve-prms-cstm-then-immed.js b/test/built-ins/Promise/resolve-prms-cstm-then-immed.js
index 3936c9700..bc292a8c4 100644
--- a/test/built-ins/Promise/resolve-prms-cstm-then-immed.js
+++ b/test/built-ins/Promise/resolve-prms-cstm-then-immed.js
@@ -27,9 +27,7 @@ flags: [async]
var returnValue = null;
var value = {};
var lateCallCount = 0;
-var thenable = new Promise(function(resolve) {
- resolve();
-});
+var thenable = new Promise(function(resolve) { resolve(); });
thenable.then = function(resolve) {
resolve(value);
@@ -46,16 +44,16 @@ thenable.then = function() {
};
promise.then(function(val) {
- if (val !== value) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
-
- if (lateCallCount > 0) {
- $DONE('The `then` method should be executed synchronously.');
- }
-
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ if (val !== value) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
+
+ if (lateCallCount > 0) {
+ $DONE('The `then` method should be executed synchronously.');
+ }
+
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/resolve-self.js b/test/built-ins/Promise/resolve-self.js
index ed519fa82..02a75bd27 100644
--- a/test/built-ins/Promise/resolve-self.js
+++ b/test/built-ins/Promise/resolve-self.js
@@ -24,20 +24,20 @@ var promise = new Promise(function(_resolve) {
});
promise.then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(reason) {
- if (!reason) {
- $DONE('The promise should be rejected with a value.');
- return;
- }
+ $DONE('The promise should not be fulfilled.');
+ }, function(reason) {
+ if (!reason) {
+ $DONE('The promise should be rejected with a value.');
+ return;
+ }
- if (reason.constructor !== TypeError) {
- $DONE('The promise should be rejected with a TypeError instance.');
- return;
- }
+ if (reason.constructor !== TypeError) {
+ $DONE('The promise should be rejected with a TypeError instance.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
returnValue = resolve(promise);
diff --git a/test/built-ins/Promise/resolve-thenable-deferred.js b/test/built-ins/Promise/resolve-thenable-deferred.js
index ea7ce79b0..2c0602aea 100644
--- a/test/built-ins/Promise/resolve-thenable-deferred.js
+++ b/test/built-ins/Promise/resolve-thenable-deferred.js
@@ -27,23 +27,21 @@ flags: [async]
var returnValue = null;
var value = {};
var resolve;
-var thenable = new Promise(function(resolve) {
- resolve(value);
-});
+var thenable = new Promise(function(resolve) { resolve(value); });
var promise = new Promise(function(_resolve) {
resolve = _resolve;
});
promise.then(function(val) {
- if (val !== value) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (val !== value) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
returnValue = resolve(thenable);
diff --git a/test/built-ins/Promise/resolve-thenable-immed.js b/test/built-ins/Promise/resolve-thenable-immed.js
index 4be0fc547..7d90a5e1c 100644
--- a/test/built-ins/Promise/resolve-thenable-immed.js
+++ b/test/built-ins/Promise/resolve-thenable-immed.js
@@ -25,9 +25,7 @@ flags: [async]
var returnValue = null;
var value = {};
-var thenable = new Promise(function(resolve) {
- resolve(value);
-});
+var thenable = new Promise(function(resolve) { resolve(value); });
var promise = new Promise(function(resolve) {
returnValue = resolve(thenable);
});
@@ -35,12 +33,12 @@ var promise = new Promise(function(resolve) {
assert.sameValue(returnValue, undefined, '"resolve" return value');
promise.then(function(val) {
- if (val !== value) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (val !== value) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/resolve/S25.4.4.5_A1.1_T1.js b/test/built-ins/Promise/resolve/S25.4.4.5_A1.1_T1.js
index b4d5943c7..07c4e02f0 100644
--- a/test/built-ins/Promise/resolve/S25.4.4.5_A1.1_T1.js
+++ b/test/built-ins/Promise/resolve/S25.4.4.5_A1.1_T1.js
@@ -10,5 +10,5 @@ description: Promise.resolve is a function
---*/
if ((typeof Promise.resolve) !== "function") {
- $ERROR("Expected Promise.resolve to be a function");
+ $ERROR("Expected Promise.resolve to be a function");
}
diff --git a/test/built-ins/Promise/resolve/S25.4.4.5_A2.1_T1.js b/test/built-ins/Promise/resolve/S25.4.4.5_A2.1_T1.js
index 6b79535d6..15718a0a6 100644
--- a/test/built-ins/Promise/resolve/S25.4.4.5_A2.1_T1.js
+++ b/test/built-ins/Promise/resolve/S25.4.4.5_A2.1_T1.js
@@ -8,8 +8,8 @@ description: Promise.resolve passes through a promise w/ same Constructor
---*/
var p1 = Promise.resolve(1),
- p2 = Promise.resolve(p1);
+ p2 = Promise.resolve(p1);
if (p1 !== p2) {
- $ERROR("Expected p1 === Promise.resolve(p1) because they have same constructor");
+ $ERROR("Expected p1 === Promise.resolve(p1) because they have same constructor");
}
diff --git a/test/built-ins/Promise/resolve/S25.4.4.5_A2.2_T1.js b/test/built-ins/Promise/resolve/S25.4.4.5_A2.2_T1.js
index 294bf71fc..2b471179f 100644
--- a/test/built-ins/Promise/resolve/S25.4.4.5_A2.2_T1.js
+++ b/test/built-ins/Promise/resolve/S25.4.4.5_A2.2_T1.js
@@ -9,20 +9,18 @@ flags: [async]
---*/
var resolveP1,
- p1 = new Promise(function(resolve) {
- resolveP1 = resolve;
- }),
- p2 = Promise.resolve(p1),
- obj = {};
+ p1 = new Promise(function (resolve) { resolveP1 = resolve; }),
+ p2 = Promise.resolve(p1),
+ obj = {};
if (p1 !== p2) {
- $ERROR("Expected p1 === Promise.resolve(p1) because they have same constructor");
+ $ERROR("Expected p1 === Promise.resolve(p1) because they have same constructor");
}
-p2.then(function(arg) {
- if (arg !== obj) {
- $ERROR("Expected promise to be resolved with obj, actually " + arg);
- }
+p2.then(function (arg) {
+ if (arg !== obj) {
+ $ERROR("Expected promise to be resolved with obj, actually " + arg);
+ }
}).then($DONE, $DONE);
resolveP1(obj);
diff --git a/test/built-ins/Promise/resolve/S25.4.4.5_A2.3_T1.js b/test/built-ins/Promise/resolve/S25.4.4.5_A2.3_T1.js
index a17137231..3ea901fc8 100644
--- a/test/built-ins/Promise/resolve/S25.4.4.5_A2.3_T1.js
+++ b/test/built-ins/Promise/resolve/S25.4.4.5_A2.3_T1.js
@@ -9,22 +9,20 @@ flags: [async]
---*/
var rejectP1,
- p1 = new Promise(function(resolve, reject) {
- rejectP1 = reject;
- }),
- p2 = Promise.resolve(p1),
- obj = {};
+ p1 = new Promise(function (resolve, reject) { rejectP1 = reject; }),
+ p2 = Promise.resolve(p1),
+ obj = {};
if (p1 !== p2) {
- $ERROR("Expected p1 === Promise.resolve(p1) because they have same constructor");
+ $ERROR("Expected p1 === Promise.resolve(p1) because they have same constructor");
}
-p2.then(function() {
- $ERROR("Expected p2 to be rejected, not fulfilled.");
-}, function(arg) {
- if (arg !== obj) {
- $ERROR("Expected promise to be rejected with reason obj, actually " + arg);
- }
+p2.then(function () {
+ $ERROR("Expected p2 to be rejected, not fulfilled.");
+}, function (arg) {
+ if (arg !== obj) {
+ $ERROR("Expected promise to be rejected with reason obj, actually " + arg);
+ }
}).then($DONE, $DONE);
rejectP1(obj);
diff --git a/test/built-ins/Promise/resolve/S25.4.4.5_A3.1_T1.js b/test/built-ins/Promise/resolve/S25.4.4.5_A3.1_T1.js
index 568d089b4..1da71f6c7 100644
--- a/test/built-ins/Promise/resolve/S25.4.4.5_A3.1_T1.js
+++ b/test/built-ins/Promise/resolve/S25.4.4.5_A3.1_T1.js
@@ -14,22 +14,22 @@ flags: [async]
var sequence = [];
var thenable = {
- then: function(onResolve, onReject) {
- sequence.push(3);
- checkSequence(sequence, "thenable.then called");
+ then: function(onResolve, onReject) {
+ sequence.push(3);
+ checkSequence(sequence, "thenable.then called");
- assert.sameValue(this, thenable);
+ assert.sameValue(this, thenable);
- onResolve('resolved');
+ onResolve('resolved');
- sequence.push(4);
- checkSequence(sequence, "after resolved");
+ sequence.push(4);
+ checkSequence(sequence, "after resolved");
- throw new Error('interrupt flow');
+ throw new Error('interrupt flow');
- sequence.push(4);
- checkSequence(sequence, "duplicate sequence point not pushed");
- }
+ sequence.push(4);
+ checkSequence(sequence, "duplicate sequence point not pushed");
+ }
};
sequence.push(1);
@@ -40,10 +40,10 @@ var p1 = Promise.resolve(thenable);
sequence.push(2);
checkSequence(sequence, "thenable.then queued but not yet called");
-p1.then(function(q) {
- sequence.push(5);
- checkSequence(sequence, "all done");
+p1.then(function (q) {
+ sequence.push(5);
+ checkSequence(sequence, "all done");
- assert.sameValue(q, 'resolved');
+ assert.sameValue(q, 'resolved');
}).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/resolve/S25.4.4.5_A4.1_T1.js b/test/built-ins/Promise/resolve/S25.4.4.5_A4.1_T1.js
index 2ae973406..3eb8f83f9 100644
--- a/test/built-ins/Promise/resolve/S25.4.4.5_A4.1_T1.js
+++ b/test/built-ins/Promise/resolve/S25.4.4.5_A4.1_T1.js
@@ -11,16 +11,14 @@ flags: [async]
---*/
var resolveP,
- p = new Promise(function(resolve) {
- resolveP = resolve;
- });
+ p = new Promise(function (resolve) { resolveP = resolve; });
resolveP(p);
-p.then(function() {
- $ERROR("Should not fulfill: should reject with TypeError.");
-}, function(err) {
- if (!(err instanceof TypeError)) {
- $ERROR("Expected TypeError, got " + err);
- }
+p.then(function () {
+ $ERROR("Should not fulfill: should reject with TypeError.");
+}, function (err) {
+ if (!(err instanceof TypeError)) {
+ $ERROR("Expected TypeError, got " + err);
+ }
}).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/resolve/S25.Promise_resolve_foreign_thenable_1.js b/test/built-ins/Promise/resolve/S25.Promise_resolve_foreign_thenable_1.js
index f67bff242..61f5e7eae 100644
--- a/test/built-ins/Promise/resolve/S25.Promise_resolve_foreign_thenable_1.js
+++ b/test/built-ins/Promise/resolve/S25.Promise_resolve_foreign_thenable_1.js
@@ -11,13 +11,13 @@ flags: [async]
---*/
var thenable = {
- then: function(onResolve, onReject) {
- return onResolve('resolved');
- }
+ then: function(onResolve, onReject) {
+ return onResolve('resolved');
+ }
};
var p = Promise.resolve(thenable);
-p.then(function(r) {
- assert.sameValue(r, 'resolved');
+p.then(function (r) {
+ assert.sameValue(r, 'resolved');
}).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/resolve/S25.Promise_resolve_foreign_thenable_2.js b/test/built-ins/Promise/resolve/S25.Promise_resolve_foreign_thenable_2.js
index c243d9c3a..1cb07bbe9 100644
--- a/test/built-ins/Promise/resolve/S25.Promise_resolve_foreign_thenable_2.js
+++ b/test/built-ins/Promise/resolve/S25.Promise_resolve_foreign_thenable_2.js
@@ -14,15 +14,15 @@ flags: [async]
var sequence = [];
var thenable = {
- then: function(onResolve, onReject) {
+ then: function(onResolve, onReject) {
- sequence.push(3);
- checkSequence(sequence, "thenable.then called");
+ sequence.push(3);
+ checkSequence(sequence, "thenable.then called");
- assert.sameValue(this, thenable, "thenable.then called with `thenable` as `this`");
+ assert.sameValue(this, thenable, "thenable.then called with `thenable` as `this`");
- return onResolve('resolved');
- }
+ return onResolve('resolved');
+ }
};
sequence.push(1);
@@ -33,9 +33,9 @@ var p = Promise.resolve(thenable);
sequence.push(2);
checkSequence(sequence, "thenable.then queued but not yet called");
-p.then(function(r) {
- sequence.push(4);
- checkSequence(sequence, "all done");
+p.then(function (r) {
+ sequence.push(4);
+ checkSequence(sequence, "all done");
- assert.sameValue(r, 'resolved');
+ assert.sameValue(r, 'resolved');
}).then($DONE, $DONE);
diff --git a/test/built-ins/Promise/resolve/capability-executor-called-twice.js b/test/built-ins/Promise/resolve/capability-executor-called-twice.js
index 37074d240..1db7b9483 100644
--- a/test/built-ins/Promise/resolve/capability-executor-called-twice.js
+++ b/test/built-ins/Promise/resolve/capability-executor-called-twice.js
@@ -27,7 +27,7 @@ Promise.resolve.call(function(executor) {
checkPoint += "a";
executor();
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, {});
assert.sameValue(checkPoint, "abc", "executor initially called with no arguments");
@@ -37,7 +37,7 @@ Promise.resolve.call(function(executor) {
checkPoint += "a";
executor(undefined, undefined);
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, {});
assert.sameValue(checkPoint, "abc", "executor initially called with (undefined, undefined)");
@@ -46,9 +46,9 @@ var checkPoint = "";
assert.throws(TypeError, function() {
Promise.resolve.call(function(executor) {
checkPoint += "a";
- executor(undefined, function() {});
+ executor(undefined, function(){});
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, {});
}, "executor initially called with (undefined, function)");
@@ -58,9 +58,9 @@ var checkPoint = "";
assert.throws(TypeError, function() {
Promise.resolve.call(function(executor) {
checkPoint += "a";
- executor(function() {}, undefined);
+ executor(function(){}, undefined);
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, {});
}, "executor initially called with (function, undefined)");
@@ -72,7 +72,7 @@ assert.throws(TypeError, function() {
checkPoint += "a";
executor("invalid value", 123);
checkPoint += "b";
- executor(function() {}, function() {});
+ executor(function(){}, function(){});
checkPoint += "c";
}, {});
}, "executor initially called with (String, Number)");
diff --git a/test/built-ins/Promise/resolve/capability-executor-not-callable.js b/test/built-ins/Promise/resolve/capability-executor-not-callable.js
index 58dfe71d6..cbc6b97ae 100644
--- a/test/built-ins/Promise/resolve/capability-executor-not-callable.js
+++ b/test/built-ins/Promise/resolve/capability-executor-not-callable.js
@@ -56,7 +56,7 @@ var checkPoint = "";
assert.throws(TypeError, function() {
Promise.resolve.call(function(executor) {
checkPoint += "a";
- executor(undefined, function() {});
+ executor(undefined, function(){});
checkPoint += "b";
}, {});
}, "executor called with (undefined, function)");
@@ -66,7 +66,7 @@ var checkPoint = "";
assert.throws(TypeError, function() {
Promise.resolve.call(function(executor) {
checkPoint += "a";
- executor(function() {}, undefined);
+ executor(function(){}, undefined);
checkPoint += "b";
}, {});
}, "executor called with (function, undefined)");
diff --git a/test/built-ins/Promise/resolve/context-non-object-with-promise.js b/test/built-ins/Promise/resolve/context-non-object-with-promise.js
index c59cabeb2..7e20d493b 100644
--- a/test/built-ins/Promise/resolve/context-non-object-with-promise.js
+++ b/test/built-ins/Promise/resolve/context-non-object-with-promise.js
@@ -14,7 +14,7 @@ info: |
features: [Symbol]
---*/
-var promise = new Promise(function() {});
+var promise = new Promise(function(){});
promise.constructor = undefined;
assert.throws(TypeError, function() {
diff --git a/test/built-ins/Promise/resolve/resolve-from-promise-capability.js b/test/built-ins/Promise/resolve/resolve-from-promise-capability.js
index 76d6483a5..40d1e1ece 100644
--- a/test/built-ins/Promise/resolve/resolve-from-promise-capability.js
+++ b/test/built-ins/Promise/resolve/resolve-from-promise-capability.js
@@ -16,9 +16,7 @@ info: |
...
---*/
-var expectedThisValue = (function() {
- return this;
-}());
+var expectedThisValue = (function() { return this; }());
var callCount = 0;
var object = {};
var thisValue, args;
diff --git a/test/built-ins/Promise/resolve/resolve-non-obj.js b/test/built-ins/Promise/resolve/resolve-non-obj.js
index ba8adcd9a..c010cbf3e 100644
--- a/test/built-ins/Promise/resolve/resolve-non-obj.js
+++ b/test/built-ins/Promise/resolve/resolve-non-obj.js
@@ -17,12 +17,12 @@ flags: [async]
---*/
Promise.resolve(23).then(function(value) {
- if (value !== 23) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (value !== 23) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/resolve/resolve-non-thenable.js b/test/built-ins/Promise/resolve/resolve-non-thenable.js
index 032ad20f7..4b764c799 100644
--- a/test/built-ins/Promise/resolve/resolve-non-thenable.js
+++ b/test/built-ins/Promise/resolve/resolve-non-thenable.js
@@ -23,12 +23,12 @@ flags: [async]
var value = {};
Promise.resolve(value).then(function(value) {
- if (value !== value) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (value !== value) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });
diff --git a/test/built-ins/Promise/resolve/resolve-poisoned-then.js b/test/built-ins/Promise/resolve/resolve-poisoned-then.js
index 98d7f3d99..0da129a2d 100644
--- a/test/built-ins/Promise/resolve/resolve-poisoned-then.js
+++ b/test/built-ins/Promise/resolve/resolve-poisoned-then.js
@@ -26,12 +26,12 @@ var poisonedThen = Object.defineProperty({}, 'then', {
});
Promise.resolve(poisonedThen).then(function() {
- $DONE('The promise should not be fulfilled.');
-}, function(val) {
- if (val !== value) {
- $DONE('The promise should be rejected with the provided value.');
- return;
- }
+ $DONE('The promise should not be fulfilled.');
+ }, function(val) {
+ if (val !== value) {
+ $DONE('The promise should be rejected with the provided value.');
+ return;
+ }
- $DONE();
-});
+ $DONE();
+ });
diff --git a/test/built-ins/Promise/resolve/resolve-prms-cstm-then.js b/test/built-ins/Promise/resolve/resolve-prms-cstm-then.js
index 2b7bccc95..fd345394c 100644
--- a/test/built-ins/Promise/resolve/resolve-prms-cstm-then.js
+++ b/test/built-ins/Promise/resolve/resolve-prms-cstm-then.js
@@ -23,9 +23,7 @@ info: |
var value = {};
var rejectCallCount = 0;
-var thenable = new Promise(function(resolve) {
- resolve();
-});
+var thenable = new Promise(function(resolve) { resolve(); });
var resolvedValue;
thenable.then = function(resolve) {
@@ -33,10 +31,10 @@ thenable.then = function(resolve) {
};
Promise.resolve(thenable).then(function(val) {
- resolvedValue = val;
-}, function() {
- rejectCallCount += 1;
-});
+ resolvedValue = val;
+ }, function() {
+ rejectCallCount += 1;
+ });
assert.sameValue(resolvedValue, value);
assert.sameValue(rejectCallCount, 0);
diff --git a/test/built-ins/Promise/resolve/resolve-thenable.js b/test/built-ins/Promise/resolve/resolve-thenable.js
index 2ea723f3b..3781e7fed 100644
--- a/test/built-ins/Promise/resolve/resolve-thenable.js
+++ b/test/built-ins/Promise/resolve/resolve-thenable.js
@@ -30,12 +30,12 @@ var thenable = {
};
Promise.resolve(thenable).then(function(val) {
- if (val !== value) {
- $DONE('The promise should be fulfilled with the provided value.');
- return;
- }
+ if (val !== value) {
+ $DONE('The promise should be fulfilled with the provided value.');
+ return;
+ }
- $DONE();
-}, function() {
- $DONE('The promise should not be rejected.');
-});
+ $DONE();
+ }, function() {
+ $DONE('The promise should not be rejected.');
+ });