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

Side by Side Diff: chrome/test/data/webrtc/jsep01_call.js

Issue 10957035: Adapted tests to API change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed video quality test, which will be coming up soon. Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/data/webrtc/getusermedia.js ('k') | chrome/test/data/webrtc/video_extraction.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 // Public interface towards the other javascript files, such as 7 // Public interface towards the other javascript files, such as
8 // message_handling.js. The contract for these functions is described in 8 // message_handling.js. The contract for these functions is described in
9 // message_handling.js. 9 // message_handling.js.
10 10
(...skipping 15 matching lines...) Expand all
26 } else if (parsed_msg.candidate) { 26 } else if (parsed_msg.candidate) {
27 var candidate = new RTCIceCandidate(parsed_msg); 27 var candidate = new RTCIceCandidate(parsed_msg);
28 peerConnection.addIceCandidate(candidate); 28 peerConnection.addIceCandidate(candidate);
29 return; 29 return;
30 } 30 }
31 addTestFailure("unknown message received"); 31 addTestFailure("unknown message received");
32 return; 32 return;
33 } 33 }
34 34
35 function createPeerConnection(stun_server) { 35 function createPeerConnection(stun_server) {
36 servers = {iceServers:[{uri:"stun:" + stun_server}]}; 36 servers = {iceServers:[{url:"stun:" + stun_server}]};
37 try { 37 try {
38 peerConnection = new webkitRTCPeerConnection(servers, null); 38 peerConnection = new webkitRTCPeerConnection(servers, null);
39 } catch (exception) { 39 } catch (exception) {
40 failTest('Failed to create peer connection: ' + exception); 40 failTest('Failed to create peer connection: ' + exception);
41 } 41 }
42 peerConnection.onaddstream = addStreamCallback_; 42 peerConnection.onaddstream = addStreamCallback_;
43 peerConnection.onremovestream = removeStreamCallback_; 43 peerConnection.onremovestream = removeStreamCallback_;
44 peerConnection.onicecandidate = iceCallback_; 44 peerConnection.onicecandidate = iceCallback_;
45 return peerConnection; 45 return peerConnection;
46 } 46 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // This only mean that we have received a valid SDP message with an offer or 92 // This only mean that we have received a valid SDP message with an offer or
93 // an answer, it does not mean that audio and video works. 93 // an answer, it does not mean that audio and video works.
94 returnToTest('ok-got-remote-stream'); 94 returnToTest('ok-got-remote-stream');
95 } 95 }
96 96
97 /** @private */ 97 /** @private */
98 function removeStreamCallback_(event) { 98 function removeStreamCallback_(event) {
99 debug('Call ended.'); 99 debug('Call ended.');
100 document.getElementById("remote-view").src = ''; 100 document.getElementById("remote-view").src = '';
101 } 101 }
OLDNEW
« no previous file with comments | « chrome/test/data/webrtc/getusermedia.js ('k') | chrome/test/data/webrtc/video_extraction.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698