| Index: LayoutTests/fast/js/Promise-resolve.html
|
| diff --git a/LayoutTests/fast/js/Promise-resolve.html b/LayoutTests/fast/js/Promise-resolve.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..919f26155e771731fdf9936449b36e855845c0d0
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/js/Promise-resolve.html
|
| @@ -0,0 +1,32 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<script src="resources/js-test-pre.js"></script>
|
| +</head>
|
| +<body>
|
| +<div id="description"></div>
|
| +<div id="console"></div>
|
| +<script>
|
| +description('Test Promise.');
|
| +
|
| +window.jsTestIsAsync = true;
|
| +
|
| +var firstPromise = new Promise(function(resolver) {
|
| + resolver.resolve('hello');
|
| +});
|
| +
|
| +var secondPromise = firstPromise.then(function(result) {
|
| + window.thisInFulfillCallback = this;
|
| + shouldBeTrue('thisInFulfillCallback === secondPromise');
|
| + window.result = result;
|
| + shouldBeEqualToString('result', 'hello');
|
| + finishJSTest();
|
| +}, function() {
|
| + fail('rejected');
|
| + finishJSTest();
|
| +});
|
| +
|
| +</script>
|
| +<script src="resources/js-test-post.js"></script>
|
| +</body>
|
| +</html>
|
|
|