Bug 1126107 - Intermittent browser_devices_get_user_media.js | WebRTC indicator hidden - Got true, expected false, r=Gijs.

This commit is contained in:
Florian Quèze 2015-04-13 16:04:53 +02:00
Родитель 54d2bc606b
Коммит 28ed2da294
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -658,6 +658,12 @@ function assertWebRTCIndicatorStatus(expected) {
let ui = Cu.import("resource:///modules/webrtcUI.jsm", {}).webrtcUI;
let expectedState = expected ? "visible" : "hidden";
let msg = "WebRTC indicator " + expectedState;
if (!expected && ui.showGlobalIndicator) {
// It seems the global indicator is not always removed synchronously
// in some cases.
info("waiting for the global indicator to be hidden");
yield promiseWaitForCondition(() => !ui.showGlobalIndicator);
}
is(ui.showGlobalIndicator, !!expected, msg);
let expectVideo = false, expectAudio = false, expectScreen = false;