Index: LayoutTests/fast/js/Promise-init.html |
diff --git a/LayoutTests/fast/js/Promise-init.html b/LayoutTests/fast/js/Promise-init.html |
index 6c52a8f902bed4ca1c0fb3fbf2b43db3d3651856..fb6b052c07f86c8dc482f5d9f157fa76ea9d280f 100644 |
--- a/LayoutTests/fast/js/Promise-init.html |
+++ b/LayoutTests/fast/js/Promise-init.html |
@@ -7,8 +7,7 @@ |
<div id="description"></div> |
<div id="console"></div> |
<script> |
-if (window.testRunner) |
- testRunner.dumpAsText(); |
+window.jsTestIsAsync = true; |
description('Test Promise.'); |
@@ -29,7 +28,11 @@ shouldThrow('new Promise()', '"TypeError: Promise constructor takes a function a |
shouldThrow('new Promise(37)', '"TypeError: Promise constructor takes a function argument"'); |
shouldNotThrow('promise = new Promise(function() { throw Error("foo"); })'); |
-// FIXME: We can't test if the promise is rejected now, but should test it in the future. |
+promise.then(undefined, function(result) { |
+ window.result = result; |
+ shouldBeEqualToString('result.message', 'foo'); |
+ finishJSTest(); |
+}); |
</script> |
<script src="resources/js-test-post.js"></script> |