Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: LayoutTests/fast/js/Promise-native-then.html

Issue 23254004: Implement ScriptPromise and ScriptFunction (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Control shouldn't reach the end of a non-void function Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
« no previous file with comments | « no previous file | LayoutTests/fast/js/Promise-native-then-expected.txt » ('j') | Source/core/testing/Internals.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698