Index: LayoutTests/fast/js/Future-reject.html |
diff --git a/LayoutTests/fast/js/Future-reject.html b/LayoutTests/fast/js/Future-reject.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8e1bbe91fbebfb9d4a753bcffe224a13def86543 |
--- /dev/null |
+++ b/LayoutTests/fast/js/Future-reject.html |
@@ -0,0 +1,38 @@ |
+<!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 Future."); |
+ |
+window.jsTestIsAsync = true; |
+ |
+function secondTest() { |
+ Future.reject("world") |
+ .catch( |
+ function(value) { |
+ window.value = value |
+ shouldBeEqualToString("value", "world"); |
+ finishJSTest(); |
+ }); |
+} |
+ |
+Future.reject("hello") |
+ .then( |
+ function(value) { |
+ fail("accept is called"); |
+ }, |
+ function(value) { |
+ window.value = value |
+ shouldBeEqualToString("value", "hello"); |
+ secondTest(); |
+ }); |
+ |
+</script> |
+<script src="resources/js-test-post.js"></script> |
+</body> |
+</html> |