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

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

Issue 1138073003: Endowing WebRTC DTMF test with better resistance to gc(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | no next file » | 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 68fd5c06df8e89362edef7f12ba119a80a95c0ff..94f41684e5eb33207f77862f43abba44b8e1a773 100644
--- a/content/test/data/media/peerconnection-call.html
+++ b/content/test/data/media/peerconnection-call.html
@@ -157,8 +157,8 @@
}
// 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
+ // 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
// sent back to pc1.
function callAndForwardRemoteStream(constraints) {
createConnections(null);
@@ -166,7 +166,7 @@
addStreamToTheFirstConnectionAndNegotiate,
printGetUserMediaError);
var onRemoteStream2 = function() {
- // Video has been detected to be playing in pc2. Clone the received
+ // Video has been detected to be playing in pc2. Clone the received
// stream and send it back to pc1.
gSecondConnection.addStream(gRemoteStreams['remote-view-2'].clone());
negotiate();
@@ -331,11 +331,12 @@
navigator.webkitGetUserMedia({audio: true, video: true},
addStreamToBothConnectionsAndNegotiate, printGetUserMediaError);
var onCallEstablished = function() {
- // Send DTMF tones.
+ // Send DTMF tones. Allocate the sender in the window to keep it from
+ // being garbage collected. https://crbug.com/486654.
var localAudioTrack = gLocalStream.getAudioTracks()[0];
- var dtmfSender = gFirstConnection.createDTMFSender(localAudioTrack);
- dtmfSender.ontonechange = onToneChange;
- dtmfSender.insertDTMF(tones);
+ window.dtmfSender = gFirstConnection.createDTMFSender(localAudioTrack);
+ window.dtmfSender.ontonechange = onToneChange;
+ window.dtmfSender.insertDTMF(tones);
// Wait for the DTMF tones callback.
addExpectedEvent();
var waitDtmf = setInterval(function() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698