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

Unified Diff: LayoutTests/fast/js/Promise-static-fulfill.html

Issue 18648011: Implement Promise.fulfill, Promise.resolve and Promise.reject. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 7 years, 5 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
« no previous file with comments | « no previous file | LayoutTests/fast/js/Promise-static-fulfill-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/js/Promise-static-fulfill.html
diff --git a/LayoutTests/fast/js/Promise-simple-fulfill.html b/LayoutTests/fast/js/Promise-static-fulfill.html
similarity index 69%
copy from LayoutTests/fast/js/Promise-simple-fulfill.html
copy to LayoutTests/fast/js/Promise-static-fulfill.html
index 77b8c4c5d916b486a0d02a45164a29331a622e04..60bb9e41f5b0bb53b94c7bdc1935ba7bf072265f 100644
--- a/LayoutTests/fast/js/Promise-simple-fulfill.html
+++ b/LayoutTests/fast/js/Promise-static-fulfill.html
@@ -10,17 +10,17 @@
description('Test Promise.');
window.jsTestIsAsync = true;
+result = undefined;
-var future = new Promise(function(resolver) {
- setTimeout(function() {
- resolver.fulfill('hello');
- }, 0);
-}).then(function(result) {
+Promise.fulfill('hello').then(function(result) {
window.result = result;
shouldBeEqualToString('result', 'hello');
finishJSTest();
+}, function(result) {
+ testFailed('rejected');
+ finishJSTest();
});
-
+shouldBe('result', 'undefined');
</script>
<script src="resources/js-test-post.js"></script>
</body>
« no previous file with comments | « no previous file | LayoutTests/fast/js/Promise-static-fulfill-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698