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..0683967ec8fab3381b080ffa98f66b511d87c3f6 |
--- /dev/null |
+++ b/LayoutTests/fast/js/Promise-resolve.html |
@@ -0,0 +1,31 @@ |
+<!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(value) { |
+ window.thisInFulfillCallback = this; |
+ shouldBeTrue("thisInFulfillCallback === secondPromise"); |
+ window.value = value; |
+ shouldBeEqualToString("value", "hello"); |
+ finishJSTest(); |
+ }); |
+ |
+</script> |
+<script src="resources/js-test-post.js"></script> |
+</body> |
+</html> |