From ea5e978b4a679920c882ff59ba3769c418d1c893 Mon Sep 17 00:00:00 2001 From: Karl Tomlinson Date: Tue, 28 Sep 2021 04:55:17 +0000 Subject: [PATCH] Bug 1731076 expose an audio output device and enable test_setSinkId_default_addTrack.html on linux r=pehrsons This was disabled for all builds due to a failed attempt at equality syntax. https://hg.mozilla.org/try/rev/5b2572b7e09a27ea8f7f122ff67d8a91b9ae3a27#l1.35 "audiooutput" devices are now not exposed before permission is granted. https://bugzilla.mozilla.org/show_bug.cgi?id=1493982 Differential Revision: https://phabricator.services.mozilla.com/D126630 --- dom/media/webrtc/tests/mochitests/mochitest.ini | 1 - .../webrtc/tests/mochitests/test_setSinkId_default_addTrack.html | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dom/media/webrtc/tests/mochitests/mochitest.ini b/dom/media/webrtc/tests/mochitests/mochitest.ini index bfbaad0895c5..3a82f3b786ea 100644 --- a/dom/media/webrtc/tests/mochitests/mochitest.ini +++ b/dom/media/webrtc/tests/mochitests/mochitest.ini @@ -67,7 +67,6 @@ skip-if = [test_setSinkId_default_addTrack.html] skip-if = os != 'linux' # the only platform with real devices - os == 'linux' # Bug 1731076 [test_setSinkId_preMutedElement.html] [test_ondevicechange.html] run-sequentially = sets prefs that may disrupt other tests diff --git a/dom/media/webrtc/tests/mochitests/test_setSinkId_default_addTrack.html b/dom/media/webrtc/tests/mochitests/test_setSinkId_default_addTrack.html index 715d658b5cc9..7e3b5c713a46 100644 --- a/dom/media/webrtc/tests/mochitests/test_setSinkId_default_addTrack.html +++ b/dom/media/webrtc/tests/mochitests/test_setSinkId_default_addTrack.html @@ -23,6 +23,10 @@ return; } + // Expose an audio output device. + SpecialPowers.wrap(document).notifyUserGestureActivation(); + await navigator.mediaDevices.selectAudioOutput(); + const allDevices = await navigator.mediaDevices.enumerateDevices(); const audioDevices = allDevices.filter(({kind}) => kind == 'audiooutput'); info(`Found ${audioDevices.length} output devices`); -- 2.11.4.GIT