Bug 1434988 - Make audio loopback mochitest return early without loopback device set up. r=achronop

MozReview-Commit-ID: AA05i50qI2A

--HG--
extra : rebase_source : 9b5911586741eacd8c8b32b1e291b9d8bd64b709
This commit is contained in:
Andreas Pehrson 2018-02-01 19:28:57 +01:00
Родитель 0bc01f8ebd
Коммит 44946573a2
1 изменённых файлов: 6 добавлений и 3 удалений

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

@ -15,9 +15,12 @@
/**
* Run a test to verify the use of LoopbackTone as audio input.
*/
scriptsReady
.then(() => FAKE_ENABLED = false)
.then(() => runTestWhenReady( async () => {
scriptsReady.then(() => runTestWhenReady(async () => {
if (!audioDevice) {
todo(false, "No loopback device set by framework. Try --use-test-media-devices");
return Promise.resolve();
}
// At this point DefaultLoopbackTone has been instantiated
// automatically on frequency TEST_AUDIO_FREQ (440 Hz). Verify
// that a tone is detected on that frequency.