Bug 1023547 - Fix intermittent dom/workers/test/test_promise.html failure. r=bz

This commit is contained in:
Nikhil Marathe 2014-07-18 18:13:47 -07:00
Родитель 8c000105e3
Коммит c152f140c3
2 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -636,11 +636,14 @@ function promiseResolveThenableCleanStack() {
// check what happens after all "next cycle" steps
// have had a chance to complete
setTimeout(function(){
results.push(x);
// Result should be [0, 2] since `thenable` will be called async.
is(results[0], 0, "Expected thenable to be called asynchronously");
is(results[1], 2, "Expected thenable to be called asynchronously");
runTest();
// See Bug 1023547 comment 13 for why this check has to be gated on p.
p.then(function() {
results.push(x);
is(results[1], 2, "Expected thenable to be called asynchronously");
runTest();
});
},1000);
}

Просмотреть файл

@ -672,11 +672,11 @@ function promiseResolveThenableCleanStack() {
// check what happens after all "next cycle" steps
// have had a chance to complete
setTimeout(function(){
results.push(x);
// Result should be [0, 2] since `thenable` will be called async.
is(results[0], 0, "Expected thenable to be called asynchronously");
// See Bug 1023547 comment 13 for why this check has to be gated on p.
p.then(function() {
results.push(x);
is(results[1], 2, "Expected thenable to be called asynchronously");
runTest();
});