| Index: LayoutTests/fast/js/resources/Promise-init-in-workers.js
|
| diff --git a/LayoutTests/fast/js/resources/Promise-init-in-workers.js b/LayoutTests/fast/js/resources/Promise-init-in-workers.js
|
| index 40052bf516dc005cc15d8591aa05719a81f4ee1d..e5962790255dd767dc5e184ece1f5ef469910335 100644
|
| --- a/LayoutTests/fast/js/resources/Promise-init-in-workers.js
|
| +++ b/LayoutTests/fast/js/resources/Promise-init-in-workers.js
|
| @@ -6,17 +6,18 @@ global.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"');
|
| @@ -27,8 +28,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) {
|
| global.result = result;
|
|
|