Bug 1013809 - switch order of setLocalDescription and setRemoteDescription for the answer. r=jib
--- a/dom/media/tests/mochitest/templates.js
+++ b/dom/media/tests/mochitest/templates.js
@@ -130,16 +130,26 @@ var commandsPeerConnection = [
send_message({"answer": test.pcRemote._last_answer,
"media_constraints": test.pcRemote.constraints});
}
test.next();
});
}
],
[
+ 'PC_REMOTE_SET_LOCAL_DESCRIPTION',
+ function (test) {
+ test.setLocalDescription(test.pcRemote, test.pcRemote._last_answer, STABLE, function () {
+ is(test.pcRemote.signalingState, STABLE,
+ "signalingState after remote setLocalDescription is 'stable'");
+ test.next();
+ });
+ }
+ ],
+ [
'PC_LOCAL_GET_ANSWER',
function (test) {
if (test.pcRemote) {
test._remote_answer = test.pcRemote._last_answer;
test._remote_constraints = test.pcRemote.constraints;
test.next();
} else {
wait_for_message().then(function(message) {
@@ -157,26 +167,16 @@ var commandsPeerConnection = [
test.setRemoteDescription(test.pcLocal, test._remote_answer, STABLE, function () {
is(test.pcLocal.signalingState, STABLE,
"signalingState after local setRemoteDescription is 'stable'");
test.next();
});
}
],
[
- 'PC_REMOTE_SET_LOCAL_DESCRIPTION',
- function (test) {
- test.setLocalDescription(test.pcRemote, test.pcRemote._last_answer, STABLE, function () {
- is(test.pcRemote.signalingState, STABLE,
- "signalingState after remote setLocalDescription is 'stable'");
- test.next();
- });
- }
- ],
- [
'PC_LOCAL_WAIT_FOR_ICE_CONNECTED',
function (test) {
var myTest = test;
var myPc = myTest.pcLocal;
function onIceConnectedSuccess () {
ok(true, "pc_local: ICE switched to 'connected' state");
myTest.next();