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

Unified Diff: LayoutTests/fast/js/Promise-then.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-then.html
diff --git a/LayoutTests/fast/js/Promise-then.html b/LayoutTests/fast/js/Promise-then.html
index 46a828a57490f40888116b21bda1c6d49caaa404..62d1923792f010b24bfe5590455e700b0ad2a277 100644
--- a/LayoutTests/fast/js/Promise-then.html
+++ b/LayoutTests/fast/js/Promise-then.html
@@ -21,19 +21,21 @@ var firstPromise = new Promise(function(newResolve) {
var secondPromise = firstPromise.then(function(result) {
window.thisInFulfillCallback = this;
shouldBeFalse('thisInFulfillCallback === firstPromise');
- shouldBeTrue('thisInFulfillCallback === secondPromise');
+ shouldBeFalse('thisInFulfillCallback === secondPromise');
+ shouldBeTrue('thisInFulfillCallback === window');
window.result = result;
shouldBeEqualToString('result', 'hello');
finishJSTest();
});
-shouldBeTrue('thisInInit === firstPromise');
+shouldBeFalse('thisInInit === firstPromise');
+shouldBeTrue('thisInInit === window');
shouldBeTrue('firstPromise instanceof Promise');
shouldBeTrue('secondPromise instanceof Promise');
-shouldThrow('firstPromise.then(null)', '"TypeError: fulfillCallback must be a function or undefined"');
-shouldThrow('firstPromise.then(undefined, null)', '"TypeError: rejectCallback must be a function or undefined"');
-shouldThrow('firstPromise.then(37)', '"TypeError: fulfillCallback must be a function or undefined"');
+shouldThrow('firstPromise.then(null)', '"TypeError: onFulfilled must be a function or undefined"');
+shouldThrow('firstPromise.then(undefined, null)', '"TypeError: onRejected must be a function or undefined"');
+shouldThrow('firstPromise.then(37)', '"TypeError: onFulfilled must be a function or undefined"');
resolve('hello');
« no previous file with comments | « LayoutTests/fast/js/Promise-simple-in-workers-expected.txt ('k') | LayoutTests/fast/js/Promise-then-callback-receiver.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698