Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: content/test/data/media/webrtc_test_audio.js

Issue 131613005: Fixed video muting test on Android, added logging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/data/media/peerconnection-call.html ('k') | content/test/data/media/webrtc_test_utilities.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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];
-}
+}
« no previous file with comments | « content/test/data/media/peerconnection-call.html ('k') | content/test/data/media/webrtc_test_utilities.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698