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

Unified Diff: LayoutTests/fast/js/Promise-init.html

Issue 17874002: [ABANDONED] Implement non-static methods of Promise and PromiseResolver. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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 | « LayoutTests/fast/js/Promise-fulfill-expected.txt ('k') | LayoutTests/fast/js/Promise-init-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/js/Promise-init.html
diff --git a/LayoutTests/fast/js/Promise-init.html b/LayoutTests/fast/js/Promise-init.html
index 6c52a8f902bed4ca1c0fb3fbf2b43db3d3651856..fb6b052c07f86c8dc482f5d9f157fa76ea9d280f 100644
--- a/LayoutTests/fast/js/Promise-init.html
+++ b/LayoutTests/fast/js/Promise-init.html
@@ -7,8 +7,7 @@
<div id="description"></div>
<div id="console"></div>
<script>
-if (window.testRunner)
- testRunner.dumpAsText();
+window.jsTestIsAsync = true;
description('Test Promise.');
@@ -29,7 +28,11 @@ shouldThrow('new Promise()', '"TypeError: Promise constructor takes a function a
shouldThrow('new Promise(37)', '"TypeError: Promise constructor takes a function argument"');
shouldNotThrow('promise = new Promise(function() { throw Error("foo"); })');
-// FIXME: We can't test if the promise is rejected now, but should test it in the future.
+promise.then(undefined, function(result) {
+ window.result = result;
+ shouldBeEqualToString('result.message', 'foo');
+ finishJSTest();
+});
</script>
<script src="resources/js-test-post.js"></script>
« no previous file with comments | « LayoutTests/fast/js/Promise-fulfill-expected.txt ('k') | LayoutTests/fast/js/Promise-init-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698