зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1421120 - Wait for the next event tick before resolving promise in webrtc tests. r=Mossop
This commit is contained in:
Родитель
4649299e4a
Коммит
99fcca089d
|
@ -54,7 +54,7 @@ function promiseWindow(url) {
|
|||
}
|
||||
|
||||
Services.obs.removeObserver(obs, "domwindowopened");
|
||||
resolve(win);
|
||||
executeSoon(() => resolve(win));
|
||||
}, {once: true});
|
||||
}, "domwindowopened");
|
||||
});
|
||||
|
@ -120,7 +120,7 @@ async function assertWebRTCIndicatorStatus(expected) {
|
|||
win.addEventListener("unload", function listener(e) {
|
||||
if (e.target == win.document) {
|
||||
win.removeEventListener("unload", listener);
|
||||
resolve();
|
||||
executeSoon(resolve);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -141,7 +141,7 @@ async function assertWebRTCIndicatorStatus(expected) {
|
|||
if (document.readyState != "complete")
|
||||
return;
|
||||
document.removeEventListener("readystatechange", onReadyStateChange);
|
||||
resolve();
|
||||
executeSoon(resolve);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ function promisePopupEvent(popup, eventSuffix) {
|
|||
let eventType = "popup" + eventSuffix;
|
||||
return new Promise(resolve => {
|
||||
popup.addEventListener(eventType, function(event) {
|
||||
resolve();
|
||||
executeSoon(resolve);
|
||||
}, {once: true});
|
||||
|
||||
});
|
||||
|
@ -297,7 +297,7 @@ function promisePopupNotificationShown(aName, aAction) {
|
|||
ok(PopupNotifications.isPanelOpen, "notification panel open");
|
||||
ok(!!PopupNotifications.panel.firstChild, "notification panel populated");
|
||||
|
||||
resolve();
|
||||
executeSoon(resolve);
|
||||
}, {once: true});
|
||||
|
||||
if (aAction)
|
||||
|
|
Загрузка…
Ссылка в новой задаче