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

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: rebase error 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 67ea62c4f381be213a45a548080c32dfc1f7da31..cf0b1d8613007112f660c778a8f83b89ba58661c 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'); },
+ function(error) { failure_('addIceCandidate', error); }
+ );
return;
}
error_('unknown message received');
@@ -489,7 +492,7 @@ function setupCall(peerConnection) {
JSON.stringify(global.createOfferConstraints, null, ' '));
peerConnection.createOffer(
setLocalAndSendMessage_,
- function() { failure_('createOffer'); },
+ function(error) { failure_('createOffer', error); },
global.createOfferConstraints);
}
@@ -910,7 +913,7 @@ function success_(method) {
/** @private */
function failure_(method, error) {
- error_(method + '() failed: ' + error);
+ error_(method + '() failed: ' + JSON.stringify(error));
}
/** @private */
@@ -926,7 +929,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