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

Unified Diff: chrome/test/data/webrtc/peerconnection.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 | « chrome/test/data/webrtc/manual/peerconnection_manual.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webrtc/peerconnection.js
diff --git a/chrome/test/data/webrtc/peerconnection.js b/chrome/test/data/webrtc/peerconnection.js
index f642da997ec538cde313491380347b87a1e5f3a5..fbe76c9d6157e024bfbf7d90034a18605c871da4 100644
--- a/chrome/test/data/webrtc/peerconnection.js
+++ b/chrome/test/data/webrtc/peerconnection.js
@@ -59,7 +59,7 @@ function createLocalOffer(constraints) {
returnToTest('ok-' + JSON.stringify(localOffer));
},
- function() { failure_('createOffer'); },
+ function(error) { failure_('createOffer', error); },
constraints);
}
@@ -83,7 +83,7 @@ function receiveOfferFromPeer(sessionDescJson, constraints) {
peerConnection_().setRemoteDescription(
sessionDescription,
function() { success_('setRemoteDescription'); },
- function() { failure_('setRemoteDescription'); });
+ function(error) { failure_('setRemoteDescription', error); });
peerConnection_().createAnswer(
function(answer) {
@@ -91,7 +91,7 @@ function receiveOfferFromPeer(sessionDescJson, constraints) {
setLocalDescription(peerConnection, answer);
returnToTest('ok-' + JSON.stringify(answer));
},
- function() { failure_('createAnswer'); },
+ function(error) { failure_('createAnswer', error); },
constraints);
}
@@ -118,7 +118,7 @@ function receiveAnswerFromPeer(sessionDescJson) {
success_('setRemoteDescription');
returnToTest('ok-accepted-answer');
},
- function() { failure_('setRemoteDescription'); });
+ function(error) { failure_('setRemoteDescription', error); });
}
/**
@@ -210,14 +210,17 @@ function receiveIceCandidates(iceCandidatesJson) {
var iceCandidates = parseJson_(iceCandidatesJson);
if (!iceCandidates.length)
throw failTest('Received invalid ICE candidate list from peer: ' +
- iceCandidatesJson);
+ iceCandidatesJson);
iceCandidates.forEach(function(iceCandidate) {
if (!iceCandidate.candidate)
failTest('Received invalid ICE candidate from peer: ' +
- iceCandidatesJson);
+ iceCandidatesJson);
- peerConnection_().addIceCandidate(new RTCIceCandidate(iceCandidate));
+ peerConnection_().addIceCandidate(new RTCIceCandidate(iceCandidate,
+ function() { success_('addIceCandidate'); },
+ function(error) { failure_('addIceCandidate', error); }
+ ));
});
returnToTest('ok-received-candidates');
@@ -260,7 +263,7 @@ function success_(method) {
/** @private */
function failure_(method, error) {
- throw failTest(method + '() failed: ' + error);
+ throw failTest(method + '() failed: ' + JSON.stringify(error));
}
/** @private */
@@ -278,7 +281,7 @@ function setLocalDescription(peerConnection, sessionDescription) {
peerConnection.setLocalDescription(
sessionDescription,
function() { success_('setLocalDescription'); },
- function() { failure_('setLocalDescription'); });
+ function(error) { failure_('setLocalDescription', error); });
}
/** @private */
« no previous file with comments | « chrome/test/data/webrtc/manual/peerconnection_manual.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698