Index: LayoutTests/fast/js/Promise-static-reject.html |
diff --git a/LayoutTests/fast/js/Promise-static-reject.html b/LayoutTests/fast/js/Promise-static-reject.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..319a110dd7b6c58611f9c1d5311e2fff04e7ab7a |
--- /dev/null |
+++ b/LayoutTests/fast/js/Promise-static-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 Promise."); |
+ |
+window.jsTestIsAsync = true; |
+ |
+function secondTest() { |
+ Promise.reject("world") |
+ .catch( |
+ function(value) { |
+ window.value = value |
+ shouldBeEqualToString("value", "world"); |
+ finishJSTest(); |
+ }); |
+} |
+ |
+Promise.reject("hello") |
+ .then( |
+ function(value) { |
+ fail("fulfilled"); |
+ }, |
+ function(value) { |
+ window.value = value |
+ shouldBeEqualToString("value", "hello"); |
+ secondTest(); |
+ }); |
+ |
+</script> |
+<script src="resources/js-test-post.js"></script> |
+</body> |
+</html> |