зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1099095 - delay checking webrtc window until it closes, r=florian
--HG-- extra : rebase_source : a80d27b122ab2d62215cc79f98532e7c9b332370
This commit is contained in:
Родитель
854aeefb1c
Коммит
180612cfeb
|
@ -665,6 +665,19 @@ function assertWebRTCIndicatorStatus(expected) {
|
|||
}
|
||||
|
||||
if (!("nsISystemStatusBar" in Ci)) {
|
||||
if (!expected) {
|
||||
let win = Services.wm.getMostRecentWindow("Browser:WebRTCGlobalIndicator");
|
||||
if (win) {
|
||||
yield new Promise((resolve, reject) => {
|
||||
win.addEventListener("unload", (e) => {
|
||||
if (e.target == win.document) {
|
||||
win.removeEventListener("unload", arguments.callee);
|
||||
resolve();
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
let indicator = Services.wm.getEnumerator("Browser:WebRTCGlobalIndicator");
|
||||
let hasWindow = indicator.hasMoreElements();
|
||||
is(hasWindow, !!expected, "popup " + msg);
|
||||
|
|
Загрузка…
Ссылка в новой задаче