mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-05 15:59:45 +00:00
Bug 1295352 - Update mediaElementCapture tests to stop all tracks before finishing. r=jib
MozReview-Commit-ID: GnfFt1vIbig --HG-- extra : rebase_source : 005bcde1072282b25f751e38c1ea3dc059811ada extra : intermediate-source : 907d83f3649296a187ab5e8b98475ad3b8b88bc2 extra : source : ead33662607bf6bc37bbcf8de6ed7daf5d773ca6
This commit is contained in:
parent
d0bbc5938c
commit
aafd1d4711
@ -104,7 +104,9 @@ runTest(() => getUserMedia({audio: true})
|
||||
array[analyser.binIndexForFrequency(TEST_AUDIO_FREQ)] < 50 &&
|
||||
array[analyser.binIndexForFrequency(1500)] < 50 &&
|
||||
array[analyser.binIndexForFrequency(2000)] > 200 &&
|
||||
array[analyser.binIndexForFrequency(2500)] < 50);
|
||||
array[analyser.binIndexForFrequency(2500)] < 50)
|
||||
.then(() => [gUMTrack, ...gUMAudioElement.srcObject.getTracks()]
|
||||
.forEach(t => t.stop()));
|
||||
})
|
||||
.then(() => ok(true, "Test passed."))
|
||||
.catch(e => ok(false, "Test failed: " + e + (e.stack ? "\n" + e.stack : ""))));
|
||||
|
@ -110,7 +110,10 @@ runTest(() => getUserMedia({video: true, fake: true})
|
||||
gUMVideoElement.play();
|
||||
return checkVideoPlaying(captureStreamElement);
|
||||
})
|
||||
.then(() => ok(true, "Test passed."))
|
||||
.then(() => {
|
||||
gUMVideoElement.srcObject.getTracks().forEach(t => t.stop());
|
||||
ok(true, "Test passed.");
|
||||
})
|
||||
.catch(e => ok(false, "Test failed: " + e + (e.stack ? "\n" + e.stack : ""))));
|
||||
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user