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

Unified Diff: LayoutTests/fast/js/Promise-catch.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
« no previous file with comments | « no previous file | LayoutTests/fast/js/Promise-catch-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/js/Promise-catch.html
diff --git a/LayoutTests/fast/js/Promise-catch.html b/LayoutTests/fast/js/Promise-catch.html
index 998ffca560ad390725276425ff9fd857124b384e..aeee73ec898cf80828e30296305eccee4a0f9438 100644
--- a/LayoutTests/fast/js/Promise-catch.html
+++ b/LayoutTests/fast/js/Promise-catch.html
@@ -20,7 +20,8 @@ var firstPromise = new Promise(function(_, newReject) {
var secondPromise = firstPromise.catch(function(result) {
window.thisInFulfillCallback = this;
shouldBeFalse('thisInFulfillCallback === firstPromise');
- shouldBeTrue('thisInFulfillCallback === secondPromise');
+ shouldBeFalse('thisInFulfillCallback === secondPromise');
+ shouldBeTrue('thisInFulfillCallback === window');
window.result = result;
shouldBeEqualToString('result', 'hello');
return 'bye';
@@ -37,12 +38,13 @@ secondPromise.then(function(result) {
}, function() {
});
-shouldBeTrue('thisInInit === firstPromise');
+shouldBeFalse('thisInInit === firstPromise');
+shouldBeTrue('thisInInit === window');
shouldBeTrue('firstPromise instanceof Promise');
shouldBeTrue('secondPromise instanceof Promise');
-shouldThrow('firstPromise.catch(null)', '"TypeError: rejectCallback must be a function or undefined"');
-shouldThrow('firstPromise.catch(37)', '"TypeError: rejectCallback must be a function or undefined"');
+shouldThrow('firstPromise.catch(null)', '"TypeError: onRejected must be a function or undefined"');
+shouldThrow('firstPromise.catch(37)', '"TypeError: onRejected must be a function or undefined"');
reject('hello');
</script>
« no previous file with comments | « no previous file | LayoutTests/fast/js/Promise-catch-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698