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

Unified Diff: content/test/data/media/peerconnection-call.html

Issue 683433004: Fix state checking of signalingState in peerconnection-call.html (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve error handling Created 6 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/media/peerconnection-call.html
diff --git a/content/test/data/media/peerconnection-call.html b/content/test/data/media/peerconnection-call.html
index 6b51273f3e45b967f0497a7c9fb8269d60c078c4..3a1eba0bd8ddf5901a5674ff80938d405222b9fa 100644
--- a/content/test/data/media/peerconnection-call.html
+++ b/content/test/data/media/peerconnection-call.html
@@ -7,6 +7,12 @@
return document.getElementById(id);
};
+ window.onerror = function(errorMsg, url, lineNumber, column, errorObj) {
+ failTest('Error: ' + errorMsg + '\nScript: ' + url +
+ '\nLine: ' + lineNumber + '\nColumn: ' + column +
+ '\nStackTrace: ' + errorObj);
+ }
+
var gFirstConnection = null;
var gSecondConnection = null;
var gTestWithoutMsid = false;
@@ -282,7 +288,6 @@
waitForVideo('remote-view-2');
}
-
// Test call with a data channel and later add audio and video.
function callWithDataAndLaterAddMedia() {
createConnections({optional:[{RtpDataChannels: true}]});
@@ -628,7 +633,6 @@
firstDataChannel.send(sendDataString);
}
-
// Event handler for when |gSecondConnection| receive a new dataChannel.
gSecondConnection.ondatachannel = function (event) {
var secondDataChannel = event.channel;
@@ -803,12 +807,16 @@
var parsedOffer = new RTCSessionDescription({ type: 'offer',
sdp: offerSdp });
- callee.setRemoteDescription(parsedOffer, function() {},
+ callee.setRemoteDescription(parsedOffer,
+ function() {
+ assertEquals('have-remote-offer',
+ callee.signalingState);
+ callee.createAnswer(
+ function (answer) {
+ onAnswerCreated(answer, caller, callee);
+ });
+ },
onRemoteDescriptionError);
- callee.createAnswer(function (answer) {
- onAnswerCreated(answer, caller, callee);
- });
- assertEquals('have-remote-offer', callee.signalingState);
}
function removeMsid(offerSdp) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698