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

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: added error message handling answer/offer and setLocal/remote desc 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
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..6360c660ac1d60baa1824ab26814851498e98568 100644
--- a/chrome/test/data/webrtc/peerconnection.js
+++ b/chrome/test/data/webrtc/peerconnection.js
@@ -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); });
}
/**
@@ -260,7 +260,7 @@ function success_(method) {
/** @private */
function failure_(method, error) {
- throw failTest(method + '() failed: ' + error);
+ throw failTest(method + '() failed: ' + JSON.stringify(error);
}
/** @private */
@@ -278,7 +278,7 @@ function setLocalDescription(peerConnection, sessionDescription) {
peerConnection.setLocalDescription(
sessionDescription,
function() { success_('setLocalDescription'); },
- function() { failure_('setLocalDescription'); });
+ function(error) { failure_('setLocalDescription', error); });
}
/** @private */

Powered by Google App Engine
This is Rietveld 408576698