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

Unified Diff: LayoutTests/fast/js/resources/Promise-catch-in-workers.js

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/resources/Promise-catch-in-workers.js
diff --git a/LayoutTests/fast/js/resources/Promise-catch-in-workers.js b/LayoutTests/fast/js/resources/Promise-catch-in-workers.js
index 9031d71776dc9d92100eeebf9e915bcb2304269f..acc787232efc251fe5dbf26495a5a8b380bc6352 100644
--- a/LayoutTests/fast/js/resources/Promise-catch-in-workers.js
+++ b/LayoutTests/fast/js/resources/Promise-catch-in-workers.js
@@ -15,7 +15,8 @@ var firstPromise = new Promise(function(newResolve, newReject) {
var secondPromise = firstPromise.catch(function(result) {
global.thisInFulfillCallback = this;
shouldBeFalse('thisInFulfillCallback === firstPromise');
- shouldBeTrue('thisInFulfillCallback === secondPromise');
+ shouldBeFalse('thisInFulfillCallback === secondPromise');
+ shouldBeTrue('thisInFulfillCallback === global');
global.result = result;
shouldBeEqualToString('result', 'hello');
return 'bye';
@@ -32,12 +33,13 @@ secondPromise.then(function(result) {
}, function() {
});
-shouldBeTrue('thisInInit === firstPromise');
+shouldBeFalse('thisInInit === firstPromise');
+shouldBeTrue('thisInInit === global');
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');
« no previous file with comments | « LayoutTests/fast/js/Promise-then-in-workers-expected.txt ('k') | LayoutTests/fast/js/resources/Promise-init-in-workers.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698