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

Unified Diff: content/test/data/media/peerconnection-call.html

Issue 252703003: Wrote a test which exercises audio-only WebRTC calls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Made fixes to audio detection Created 6 years, 8 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
Index: content/test/data/media/peerconnection-call.html
diff --git a/content/test/data/media/peerconnection-call.html b/content/test/data/media/peerconnection-call.html
index 1c7b5bf8ac61afa04d08635d3ce92469553af6b2..2079218251a532b79fa34554484703cca273cd51 100644
--- a/content/test/data/media/peerconnection-call.html
+++ b/content/test/data/media/peerconnection-call.html
@@ -300,9 +300,9 @@
remoteAudioTrack.enabled = enabled;
}
- function callAndEnsureAudioIsPlaying(beLenient) {
+ function callAndEnsureAudioIsPlaying(beLenient, constraints) {
createConnections(null);
- navigator.webkitGetUserMedia({audio: true, video: true},
+ navigator.webkitGetUserMedia(constraints,
addStreamToBothConnectionsAndNegotiate, printGetUserMediaError);
// Wait until we have gathered samples and can conclude if audio is playing.
@@ -313,16 +313,13 @@
verifyAudioIsPlaying(samples, beLenient);
eventOccured();
});
-
- // (Also, ensure video muting doesn't affect audio).
- enableRemoteVideo(gSecondConnection, false);
};
- detectVideoPlaying('remote-view-2', onCallEstablished);
+ waitForConnectionToStabilize(gFirstConnection, onCallEstablished);
}
function callAndEnsureAudioTrackMutingWorks(beLenient) {
- callAndEnsureAudioIsPlaying(beLenient);
+ callAndEnsureAudioIsPlaying(beLenient, {audio: true, video: true});
setAllEventsOccuredHandler(function() {
// Call is up, now mute the track and check everything goes silent (give
// it a small delay though, we don't expect it to happen instantly).
@@ -338,10 +335,12 @@
}
function callAndEnsureAudioTrackUnmutingWorks(beLenient) {
- callAndEnsureAudioIsPlaying(beLenient);
+ callAndEnsureAudioIsPlaying(beLenient, {audio: true, video: true});
setAllEventsOccuredHandler(function() {
// Mute, wait a while, unmute, verify audio gets back up.
+ // (Also, ensure video muting doesn't affect audio).
enableRemoteAudio(gSecondConnection, false);
+ enableRemoteVideo(gSecondConnection, false);
setTimeout(function() {
enableRemoteAudio(gSecondConnection, true);

Powered by Google App Engine
This is Rietveld 408576698