| Index: LayoutTests/fast/js/Promise-native-resolve.html
|
| diff --git a/LayoutTests/fast/js/Promise-onFulfilled-deep.html b/LayoutTests/fast/js/Promise-native-resolve.html
|
| similarity index 50%
|
| copy from LayoutTests/fast/js/Promise-onFulfilled-deep.html
|
| copy to LayoutTests/fast/js/Promise-native-resolve.html
|
| index fce7702a697c8623ae3e3c44894969176b0962e8..8697898c75361ac57266ca60dccb15cbad1bf873 100644
|
| --- a/LayoutTests/fast/js/Promise-onFulfilled-deep.html
|
| +++ b/LayoutTests/fast/js/Promise-native-resolve.html
|
| @@ -7,23 +7,22 @@
|
| <div id="description"></div>
|
| <div id="console"></div>
|
| <script>
|
| -description('Test Promise.');
|
| +description('Test Promise resolve inside Blink.');
|
|
|
| window.jsTestIsAsync = true;
|
|
|
| var result;
|
| var resolve;
|
| -var promise = new Promise(function (r) { resolve = r; });
|
| +var promise = new Promise(function(res) { resolve = res; });
|
| +var blinkPromise = internals.createResolvedPromise(promise);
|
|
|
| -for (var i = 0; i < 5000; ++i)
|
| - promise = promise.then(function (value) { return value; }, function () { testFailed('rejected'); });
|
| -
|
| -promise.then(function (value) {
|
| - window.result = value;
|
| +promise.then(function(value) {
|
| + return blinkPromise;
|
| +}).then(function(value) {
|
| + result = value;
|
| shouldBe('result', '42');
|
| }).then(finishJSTest, finishJSTest);
|
|
|
| -shouldBe('result', 'undefined');
|
| resolve(42);
|
|
|
| </script>
|
|
|