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

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

Issue 2167133002: Separates the WebRTC browser tests that deal with audio detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Typo DISABLE -> DISABLED Created 4 years, 5 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/content_tests.gypi ('k') | content/test/data/media/peerconnection-call-audio.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b0b6758d399312fd617bb60f3b16b10a52f3a2ab..9782ef90091d3d5dbb42aad0fbea734626aad7c8 100644
--- a/content/test/data/media/peerconnection-call.html
+++ b/content/test/data/media/peerconnection-call.html
@@ -2,7 +2,6 @@
<head>
<script type="text/javascript" src="webrtc_test_utilities.js"></script>
<script type="text/javascript" src="webrtc_test_common.js"></script>
- <script type="text/javascript" src="webrtc_test_audio.js"></script>
<script type="text/javascript">
$ = function(id) {
return document.getElementById(id);
@@ -22,7 +21,6 @@
var gRemoteStreams = {};
-
setAllEventsOccuredHandler(reportTestSuccess);
// Test that we can setup a call with an audio and video track (must request
@@ -99,28 +97,6 @@
});
}
- // The second set of constraints should request audio (e.g. audio:true) since
- // we expect audio to be playing after the second renegotiation.
- function callAndRenegotiateToAudio(constraints, renegotiationConstraints) {
- createConnections(null);
- navigator.webkitGetUserMedia(constraints,
- addStreamToBothConnectionsAndNegotiate, printGetUserMediaError);
-
- waitForConnectionToStabilize(gFirstConnection, function() {
- gFirstConnection.removeStream(gLocalStream);
- gSecondConnection.removeStream(gLocalStream);
-
- navigator.webkitGetUserMedia(renegotiationConstraints,
- addStreamToTheFirstConnectionAndNegotiate, printGetUserMediaError);
-
- var onCallEstablished = function() {
- ensureAudioPlaying(gSecondConnection);
- };
-
- waitForConnectionToStabilize(gFirstConnection, onCallEstablished);
- });
- }
-
// First makes a call between pc1 and pc2 where a stream is sent from pc1 to
// pc2. The stream sent from pc1 to pc2 is cloned from the stream received on
// pc2 to test that cloning of remote video tracks works as intended and is
@@ -270,33 +246,6 @@
offerOptions);
}
- function callAndEnsureAudioIsPlaying(constraints) {
- createConnections(null);
-
- // Add the local stream to gFirstConnection to play one-way audio.
- navigator.webkitGetUserMedia(constraints,
- addStreamToTheFirstConnectionAndNegotiate, printGetUserMediaError);
-
- var onCallEstablished = function() {
- ensureAudioPlaying(gSecondConnection);
- };
-
- waitForConnectionToStabilize(gFirstConnection, onCallEstablished);
- }
-
- function callWithIsac16KAndEnsureAudioIsPlaying(constraints) {
- setOfferSdpTransform(function(sdp) {
- sdp = sdp.replace(/m=audio (\d+) RTP\/SAVPF.*\r\n/g,
- 'm=audio $1 RTP/SAVPF 103 126\r\n');
- sdp = sdp.replace('a=fmtp:111 minptime=10', 'a=fmtp:103 minptime=10');
- if (sdp.search('a=rtpmap:103 ISAC/16000') == -1)
- failTest('Missing iSAC 16K codec on Android; cannot force codec.');
-
- return sdp;
- });
- callAndEnsureAudioIsPlaying(constraints);
- }
-
function enableRemoteVideo(peerConnection, enabled) {
remoteStream = peerConnection.getRemoteStreams()[0];
remoteStream.getVideoTracks()[0].enabled = enabled;
@@ -307,78 +256,6 @@
remoteStream.getAudioTracks()[0].enabled = enabled;
}
- function enableLocalVideo(peerConnection, enabled) {
- localStream = peerConnection.getLocalStreams()[0];
- localStream.getVideoTracks()[0].enabled = enabled;
- }
-
- function enableLocalAudio(peerConnection, enabled) {
- localStream = peerConnection.getLocalStreams()[0];
- localStream.getAudioTracks()[0].enabled = enabled;
- }
-
- function callAndEnsureRemoteAudioTrackMutingWorks() {
- callAndEnsureAudioIsPlaying({audio: true, video: true});
- setAllEventsOccuredHandler(function() {
- setAllEventsOccuredHandler(reportTestSuccess);
-
- // Call is up, now mute the remote track and check we stop playing out
- // audio (after a small delay, we don't expect it to happen instantly).
- enableRemoteAudio(gSecondConnection, false);
- ensureSilence(gSecondConnection);
- });
- }
-
- function callAndEnsureLocalAudioTrackMutingWorks() {
- callAndEnsureAudioIsPlaying({audio: true, video: true});
- setAllEventsOccuredHandler(function() {
- setAllEventsOccuredHandler(reportTestSuccess);
-
- // Call is up, now mute the local track of the sending side and ensure
- // the receiving side stops receiving audio.
- enableLocalAudio(gFirstConnection, false);
- ensureSilence(gSecondConnection);
- });
- }
-
- function callAndEnsureAudioTrackUnmutingWorks() {
- callAndEnsureAudioIsPlaying({audio: true, video: true});
- setAllEventsOccuredHandler(function() {
- setAllEventsOccuredHandler(reportTestSuccess);
-
- // 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);
- }, 500);
-
- setTimeout(function() {
- ensureAudioPlaying(gSecondConnection);
- }, 1500);
- });
- }
-
- function callAndEnsureLocalVideoMutingDoesntMuteAudio() {
- callAndEnsureAudioIsPlaying({audio: true, video: true});
- setAllEventsOccuredHandler(function() {
- setAllEventsOccuredHandler(reportTestSuccess);
- enableLocalVideo(gFirstConnection, false);
- ensureAudioPlaying(gSecondConnection);
- });
- }
-
- function callAndEnsureRemoteVideoMutingDoesntMuteAudio() {
- callAndEnsureAudioIsPlaying({audio: true, video: true});
- setAllEventsOccuredHandler(function() {
- setAllEventsOccuredHandler(reportTestSuccess);
- enableRemoteVideo(gSecondConnection, false);
- ensureAudioPlaying(gSecondConnection);
- });
- }
-
function callAndEnsureVideoTrackMutingWorks() {
createConnections(null);
navigator.webkitGetUserMedia({audio: true, video: true},
@@ -710,7 +587,6 @@
return sdp.replace(/a=group:BUNDLE .*\r\n/g, '');
}
-
function onRemoteStream(e, target) {
console.log("Receiving remote stream...");
if (gTestWithoutMsid && e.stream.id != "default") {
« no previous file with comments | « content/content_tests.gypi ('k') | content/test/data/media/peerconnection-call-audio.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698