Index: LayoutTests/fast/js/Promise-native-then.html |
diff --git a/LayoutTests/fast/js/Promise-then-without-callbacks.html b/LayoutTests/fast/js/Promise-native-then.html |
similarity index 50% |
copy from LayoutTests/fast/js/Promise-then-without-callbacks.html |
copy to LayoutTests/fast/js/Promise-native-then.html |
index ccf7854e287570fae4971ebb3bb035a15d6d9bf4..e556b0d71ab882fa8bfa1fa35ca5a53815786166 100644 |
--- a/LayoutTests/fast/js/Promise-then-without-callbacks.html |
+++ b/LayoutTests/fast/js/Promise-native-then.html |
@@ -11,12 +11,13 @@ description('Test Promise.'); |
window.jsTestIsAsync = true; |
-new Promise(function(r) { r.fulfill('hello'); }) |
- .then() |
- .then(function(result) { |
- window.result = result; |
- shouldBeEqualToString('result', 'hello'); |
- finishJSTest(); |
+ var promise = new Promise(function(r) { r.fulfill(10); }); |
+ var newPromise = window.internals.addOneToPromise(promise); |
+ console.log("Got a new promise: " + newPromise); |
+ newPromise.then(function(presult) { |
+ result = presult; |
+ shouldBe('result', '11'); |
+ finishJSTest(); |
}); |
</script> |