1 importScripts('../../../resources/js-test.js');
3 description('Test Promise.');
6 global
.jsTestIsAsync
= true;
8 var firstPromise
= new Promise(function(resolve
) {
12 var secondPromise
= firstPromise
.then(function(result
) {
13 global
.thisInFulfillCallback
= this;
14 shouldBeFalse('thisInFulfillCallback === secondPromise');
15 shouldBeTrue('thisInFulfillCallback === global');
16 global
.result
= result
;
17 shouldBeEqualToString('result', 'hello');