зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1450163 - Wait for the end of the second tab streams before checking the number of streams and indicator in browser/base/content/test/webrtc/browser_devices_get_user_media_multi_process.js. r=dao
This commit is contained in:
Родитель
9a22c79e38
Коммит
0699990a4f
|
@ -83,18 +83,19 @@ var gTests = [
|
|||
is(webrtcUI.getActiveStreams(true, true, true).length, 2, "2 active streams");
|
||||
|
||||
info("removing the second tab");
|
||||
// FIXME: This should wait for indicator update instead (bug 1444007).
|
||||
let sessionStorePromise = BrowserTestUtils.waitForSessionStoreUpdate(tab);
|
||||
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
await sessionStorePromise;
|
||||
|
||||
// Check that we still show the sharing indicators for the first tab's stream.
|
||||
await TestUtils.waitForCondition(() => !webrtcUI.showCameraIndicator);
|
||||
await Promise.all([
|
||||
TestUtils.waitForCondition(() => !webrtcUI.showCameraIndicator),
|
||||
TestUtils.waitForCondition(() => webrtcUI.getActiveStreams(true, true, true).length == 1),
|
||||
]);
|
||||
|
||||
ok(webrtcUI.showGlobalIndicator, "webrtcUI wants the global indicator shown");
|
||||
ok(!webrtcUI.showCameraIndicator, "webrtcUI wants the camera indicator hidden");
|
||||
ok(webrtcUI.showMicrophoneIndicator, "webrtcUI wants the mic indicator shown");
|
||||
is(webrtcUI.getActiveStreams(false, true).length, 1, "1 active audio stream");
|
||||
is(webrtcUI.getActiveStreams(true, true, true).length, 1, "1 active stream");
|
||||
|
||||
await checkSharingUI({audio: true});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче