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

Unified Diff: chrome/test/data/webrtc/manual/peerconnection_manual.js

Issue 306033004: Now catches the error message from RTCPeerConnection and createAnswer/Offer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the format Created 6 years, 6 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 | chrome/test/data/webrtc/peerconnection.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « no previous file | chrome/test/data/webrtc/peerconnection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698