Index: LayoutTests/fast/js/Future-resolve.html |
diff --git a/LayoutTests/fast/js/Future-resolve.html b/LayoutTests/fast/js/Future-resolve.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a3e53b2603790128f6cfd0c86596b0d03a4fe31d |
--- /dev/null |
+++ b/LayoutTests/fast/js/Future-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 Future."); |
+ |
+window.jsTestIsAsync = true; |
+ |
+var firstFuture = new Future( |
+ function(resolver) { |
+ resolver.resolve("hello"); |
+ }); |
+ |
+var secondFuture = firstFuture.then( |
+ function(value) { |
+ window.thisInAcceptCallback = this; |
+ shouldBeTrue("thisInAcceptCallback === secondFuture"); |
+ window.value = value; |
+ shouldBeEqualToString("value", "hello"); |
+ finishJSTest(); |
+ }); |
+ |
+</script> |
+<script src="resources/js-test-post.js"></script> |
+</body> |
+</html> |