Chromium Code Reviews| Index: chrome/test/data/webrtc/manual/peerconnection_manual.js |
| diff --git a/chrome/test/data/webrtc/manual/peerconnection_manual.js b/chrome/test/data/webrtc/manual/peerconnection_manual.js |
| index 2ee156c0a7c976fead9ef50014fc1e1d00152d0f..a40e739d344147d7b4106a04116986d74fecb5b3 100644 |
| --- a/chrome/test/data/webrtc/manual/peerconnection_manual.js |
| +++ b/chrome/test/data/webrtc/manual/peerconnection_manual.js |
| @@ -432,19 +432,22 @@ function handleMessage(peerConnection, message) { |
| peerConnection.setRemoteDescription( |
| session_description, |
| function() { success_('setRemoteDescription'); }, |
| - function() { failure_('setRemoteDescription'); }); |
| + function(error) { failure_('setRemoteDescription', error); }); |
| if (session_description.type == 'offer') { |
| print_('createAnswer with constraints: ' + |
| JSON.stringify(global.createAnswerConstraints, null, ' ')); |
| peerConnection.createAnswer( |
| - setLocalAndSendMessage_, |
| - function() { failure_('createAnswer'); }, |
| - global.createAnswerConstraints); |
| + setLocalAndSendMessage_, |
| + function(error) { failure_('createAnswer', error); }, |
| + global.createAnswerConstraints); |
| } |
| return; |
| } else if (parsed_msg.candidate) { |
| var candidate = new RTCIceCandidate(parsed_msg); |
| - peerConnection.addIceCandidate(candidate); |
| + peerConnection.addIceCandidate(candidate, |
| + function() { success_('addIceCandidate success'); }, |
|
kjellander_chromium
2014/06/10 08:55:33
No need to put the ' success' part in here. For th
jansson
2014/06/10 10:08:55
Done.
|
| + function(error) { failure_('addIceCandidate failed', error); } |
| + ); |
| return; |
| } |
| error_('unknown message received'); |
| @@ -470,7 +473,7 @@ function setupCall(peerConnection) { |
| JSON.stringify(global.createOfferConstraints, null, ' ')); |
| peerConnection.createOffer( |
| setLocalAndSendMessage_, |
| - function() { failure_('createOffer'); }, |
| + function(error) { failure_('createOffer', error); }, |
| global.createOfferConstraints); |
| } |
| @@ -892,7 +895,7 @@ function success_(method) { |
| /** @private */ |
| function failure_(method, error) { |
| - error_(method + '() failed: ' + error); |
| + error_(method + '() failed: ' + JSON.stringify(error)); |
| } |
| /** @private */ |
| @@ -908,7 +911,7 @@ function setLocalAndSendMessage_(session_description) { |
| global.peerConnection.setLocalDescription( |
| session_description, |
| function() { success_('setLocalDescription'); }, |
| - function() { failure_('setLocalDescription'); }); |
| + function(error) { failure_('setLocalDescription', error); }); |
| print_('Sending SDP message:\n' + session_description.sdp); |
| sendToPeer(global.remotePeerId, JSON.stringify(session_description)); |
| } |