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

Unified Diff: LayoutTests/fast/js/Promise-resolve-with-then-reject.html

Issue 24980002: Implement AP2 Promises (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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-resolve-with-then-reject.html
diff --git a/LayoutTests/fast/js/Promise-resolve-with-then-reject.html b/LayoutTests/fast/js/Promise-resolve-with-then-reject.html
index c9c53ac26ffc85c4e2a7811b6e1992d004899b4b..88ae3497f2e15234ffbaa77deef30075e6e5ace8 100644
--- a/LayoutTests/fast/js/Promise-resolve-with-then-reject.html
+++ b/LayoutTests/fast/js/Promise-resolve-with-then-reject.html
@@ -10,13 +10,12 @@
description('Test Promise.');
window.jsTestIsAsync = true;
-var callback;
var value = {
then: function(fulfillCallback, rejectCallback) {
testPassed('value.then is called.');
window.thisValue = this;
shouldBe('thisValue', 'value');
- callback = rejectCallback;
+ rejectCallback('hello');
}
};
var promise = new Promise(function(resolve) { resolve(value); });
@@ -33,7 +32,6 @@ promise.then(function(result) {
debug('The promise is not rejected now.');
-callback('hello');
</script>
<script src="resources/js-test-post.js"></script>
</body>

Powered by Google App Engine
This is Rietveld 408576698