| Index: LayoutTests/fast/js/Promise-native-reject.html
|
| diff --git a/LayoutTests/fast/js/Promise-native-reject.html b/LayoutTests/fast/js/Promise-native-reject.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..59860e6f52a1e7d8a974d68383f6ebe8d8bab14c
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/js/Promise-native-reject.html
|
| @@ -0,0 +1,33 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<script src="../../resources/js-test.js"></script>
|
| +</head>
|
| +<body>
|
| +<div id="description"></div>
|
| +<div id="console"></div>
|
| +<script>
|
| +description('Test Promise reject inside Blink.');
|
| +
|
| +window.jsTestIsAsync = true;
|
| +
|
| +var reject;
|
| +var promise = new Promise(function(res, rej) { reject = rej; });
|
| +var blinkPromise = internals.createRejectedPromise(42);
|
| +
|
| +promise.then(function() {
|
| + testFailed('fulfilled');
|
| +}, function(value) {
|
| + return blinkPromise;
|
| +}).then(function() {
|
| + testFailed('fulfilled');
|
| +}, function(value) {
|
| + result = value;
|
| + shouldBe('result', '42');
|
| +}).then(finishJSTest, finishJSTest);
|
| +
|
| +reject(118);
|
| +
|
| +</script>
|
| +</body>
|
| +</html>
|
|
|