| Index: LayoutTests/fast/js/Promise-init.html
|
| diff --git a/LayoutTests/fast/js/Promise-init.html b/LayoutTests/fast/js/Promise-init.html
|
| index d2c910f8e9e0d121b9edf1b7600e97a7d0af97a8..a2ee6a7c5502751d5523a09e9ba17a3f6a21b24d 100644
|
| --- a/LayoutTests/fast/js/Promise-init.html
|
| +++ b/LayoutTests/fast/js/Promise-init.html
|
| @@ -12,17 +12,18 @@ window.jsTestIsAsync = true;
|
| description('Test Promise.');
|
|
|
| var thisInInit;
|
| -var resolver;
|
| -var promise = new Promise(function(r) {
|
| +var resolve, reject;
|
| +var promise = new Promise(function(newResolve, newReject) {
|
| thisInInit = this;
|
| - resolver = r;
|
| + resolve = newResolve;
|
| + reject = newReject;
|
| });
|
|
|
| shouldBeTrue('promise instanceof Promise');
|
| shouldBe('promise.constructor', 'Promise');
|
| shouldBe('thisInInit', 'promise');
|
| -shouldBeTrue('resolver instanceof PromiseResolver');
|
| -shouldBe('resolver.constructor', 'PromiseResolver');
|
| +shouldBeTrue('resolve instanceof Function');
|
| +shouldBeTrue('reject instanceof Function');
|
|
|
| shouldThrow('new Promise()', '"TypeError: Promise constructor takes a function argument"');
|
| shouldThrow('new Promise(37)', '"TypeError: Promise constructor takes a function argument"');
|
| @@ -33,8 +34,8 @@ promise.then(undefined, function(result) {
|
| shouldBeEqualToString('result.message', 'foo');
|
| });
|
|
|
| -new Promise(function(resolver) {
|
| - resolver.fulfill("hello");
|
| +new Promise(function(resolve) {
|
| + resolve("hello");
|
| throw Error("foo");
|
| }).then(function(result) {
|
| window.result = result;
|
|
|