Bug 1420037 - Wait for all payload to be finished in DAMP requestsFinished. r=Honza

MozReview-Commit-ID: 3R5BY2oeKKL

--HG--
extra : rebase_source : e26c29f4ffca43e7533c9703e0508e982d80c095
This commit is contained in:
Alexandre Poirot 2017-11-23 01:26:04 -08:00
Родитель c32ab9e219
Коммит fad630a61a
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -714,7 +714,7 @@ async _consoleOpenWithCachedMessagesTest() {
requests.set(id, false);
}
function onTimings(_, id) {
function onPayloadReady(_, id) {
requests.set(id, true);
maybeResolve();
}
@ -727,12 +727,12 @@ async _consoleOpenWithCachedMessagesTest() {
// All requests are done - unsubscribe from events and resolve!
window.off(EVENTS.NETWORK_EVENT, onRequest);
window.off(EVENTS.RECEIVED_EVENT_TIMINGS, onTimings);
window.off(EVENTS.PAYLOAD_READY, onPayloadReady);
resolve();
}
window.on(EVENTS.NETWORK_EVENT, onRequest);
window.on(EVENTS.RECEIVED_EVENT_TIMINGS, onTimings);
window.on(EVENTS.PAYLOAD_READY, onPayloadReady);
});
},