Commit 61ac0d3b authored by tommi's avatar tommi Committed by Commit bot

Fix state checking of signalingState in peerconnection-call.html

and also create an answer when setting the remote description has completed.

BUG=369796

Review URL: https://codereview.chromium.org/683433004

Cr-Commit-Position: refs/heads/master@{#301425}
parent c5b11ef4
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment