Index: content/test/data/media/webrtc_test_audio.js |
diff --git a/content/test/data/media/webrtc_test_audio.js b/content/test/data/media/webrtc_test_audio.js |
index c9910be7d8d6ab1a0968e32e615902d585da7d53..68312ed3e72d743d100b17cc1628949fbce31c3e 100644 |
--- a/content/test/data/media/webrtc_test_audio.js |
+++ b/content/test/data/media/webrtc_test_audio.js |
@@ -8,11 +8,13 @@ |
// calls back |callback| with an array with numbers in the [0, 32768] range. |
function gatherAudioLevelSamples(peerConnection, numSamples, frequency, |
callback) { |
+ console.log('Gathering ' + numSamples + ' audio samples...'); |
var audioLevelSamples = [] |
var gatherSamples = setInterval(function() { |
peerConnection.getStats(function(response) { |
audioLevelSamples.push(getAudioLevelFromStats_(response)); |
if (audioLevelSamples.length == numSamples) { |
+ console.log('Gathered all samples.'); |
clearInterval(gatherSamples); |
callback(audioLevelSamples); |
} |
@@ -42,7 +44,7 @@ function verifyAudioIsPlaying(samples) { |
'to be 4000 < avg < 8000.' |
if (largest < 25000) |
throw 'Too low max audio level: got ' + largest + ', expected > 30000.'; |
-}; |
+} |
// If silent (like when muted), we should get very near zero audio level. |
function verifyIsSilent(samples) { |
@@ -71,4 +73,4 @@ function getAudioLevelFromStats_(response) { |
expectEquals(1, audioOutputLevels.length); |
return audioOutputLevels[0]; |
-} |
+} |