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

Side by Side Diff: content/test/data/media/datachannel_test.html

Issue 2446173002: Use RTCPeerConnection instead of webkitRTCPeerConnection (Closed)
Patch Set: rebase Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>RTCDataChannel Content Browser Test</title> 2 <title>RTCDataChannel Content Browser Test</title>
3 <script type="text/javascript" src="webrtc_test_utilities.js"></script> 3 <script type="text/javascript" src="webrtc_test_utilities.js"></script>
4 <script> 4 <script>
5 5
6 // Tests that an RTCDataChannel with event handlers is not garbage-collected 6 // Tests that an RTCDataChannel with event handlers is not garbage-collected
7 // prematurely. 7 // prematurely.
8 function testDataChannelGC() { 8 function testDataChannelGC() {
9 var pc1 = new webkitRTCPeerConnection(null); 9 var pc1 = new RTCPeerConnection();
10 var pc2 = new webkitRTCPeerConnection(null); 10 var pc2 = new RTCPeerConnection();
11 11
12 var iceCandidateHandler = function(rpc) { 12 var iceCandidateHandler = function(rpc) {
13 return function(e) { 13 return function(e) {
14 if (e.candidate) { 14 if (e.candidate) {
15 rpc.addIceCandidate(e.candidate); 15 rpc.addIceCandidate(e.candidate);
16 } 16 }
17 } 17 }
18 }; 18 };
19 19
20 pc1.addEventListener("icecandidate", iceCandidateHandler(pc2)); 20 pc1.addEventListener("icecandidate", iceCandidateHandler(pc2));
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 pc2.setRemoteDescription(sdp1, function() { 56 pc2.setRemoteDescription(sdp1, function() {
57 console.log("creating answer"); 57 console.log("creating answer");
58 pc2.createAnswer(function(sdp2) { 58 pc2.createAnswer(function(sdp2) {
59 pc1.setRemoteDescription(sdp2); 59 pc1.setRemoteDescription(sdp2);
60 pc2.setLocalDescription(sdp2); 60 pc2.setLocalDescription(sdp2);
61 }, error => failTest(error.toString())); 61 }, error => failTest(error.toString()));
62 }, error => failTest(error.toString())); 62 }, error => failTest(error.toString()));
63 }, error => failTest(error.toString())); 63 }, error => failTest(error.toString()));
64 } 64 }
65 </script> 65 </script>
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/tab_capture/performance.js ('k') | content/test/data/media/mediarecorder_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698