Index: LayoutTests/fast/js/resources/Promise-then-in-workers.js |
diff --git a/LayoutTests/fast/js/resources/Promise-then-in-workers.js b/LayoutTests/fast/js/resources/Promise-then-in-workers.js |
index eee8f9c14aab9f5a4d4c7828f50594b16d630729..051f035dc69e7abda6509a0164aa7f83f7184784 100644 |
--- a/LayoutTests/fast/js/resources/Promise-then-in-workers.js |
+++ b/LayoutTests/fast/js/resources/Promise-then-in-workers.js |
@@ -16,19 +16,21 @@ var firstPromise = new Promise(function(newResolve) { |
var secondPromise = firstPromise.then(function(result) { |
global.thisInFulfillCallback = this; |
shouldBeFalse('thisInFulfillCallback === firstPromise'); |
- shouldBeTrue('thisInFulfillCallback === secondPromise'); |
+ shouldBeFalse('thisInFulfillCallback === secondPromise'); |
+ shouldBeTrue('thisInFulfillCallback === global'); |
global.result = result; |
shouldBeEqualToString('result', 'hello'); |
finishJSTest(); |
}); |
-shouldBeTrue('thisInInit === firstPromise'); |
+shouldBeFalse('thisInInit === firstPromise'); |
+shouldBeTrue('thisInInit === global'); |
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'); |