Backed out changeset 0a3b00521c3b (bug 965644) for turning test_promise.html nearly permafail

This commit is contained in:
Wes Kocher 2014-06-17 17:34:36 -07:00
Родитель 5e91ece22c
Коммит 5f29f7751e
2 изменённых файлов: 10 добавлений и 26 удалений

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

@ -202,23 +202,15 @@ function promiseRacePromiseArray() {
}
var arr = [
new Promise(function(resolve) {
resolve("first");
}),
Promise.resolve("second"),
new Promise(function() {}),
new Promise(function(resolve) {
setTimeout(function() {
setTimeout(function() {
resolve("fourth");
}, 0);
}, 0);
}),
timeoutPromise(50),
timeoutPromise(20),
timeoutPromise(30),
timeoutPromise(100)
];
var p = Promise.race(arr);
p.then(function(winner) {
is(winner, "first", "First queued resolution should win the race.");
is(winner, 20, "Fastest timeout should win.");
runTest();
});
}

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

@ -565,23 +565,15 @@ function promiseRacePromiseArray() {
}
var arr = [
new Promise(function(resolve) {
resolve("first");
}),
Promise.resolve("second"),
new Promise(function() {}),
new Promise(function(resolve) {
setTimeout(function() {
setTimeout(function() {
resolve("fourth");
}, 0);
}, 0);
}),
timeoutPromise(50),
timeoutPromise(20),
timeoutPromise(30),
timeoutPromise(100)
];
var p = Promise.race(arr);
p.then(function(winner) {
is(winner, "first", "First queued resolution should win the race.");
is(winner, 20, "Fastest timeout should win.");
runTest();
});
}