2013-05-17 06:47:50 +04:00
|
|
|
|
<!DOCTYPE HTML>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<script type="application/javascript" src="pc.js"></script>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<pre id="test">
|
|
|
|
|
<script type="application/javascript">
|
|
|
|
|
createHTML({
|
|
|
|
|
bug: "784519",
|
|
|
|
|
title: "setLocalDescription (answer) in 'stable'"
|
|
|
|
|
});
|
|
|
|
|
|
2015-01-29 01:05:56 +03:00
|
|
|
|
runNetworkTest(function () {
|
2015-01-29 01:05:57 +03:00
|
|
|
|
var test = new PeerConnectionTest();
|
2015-01-29 01:05:56 +03:00
|
|
|
|
test.setMediaConstraints([{audio: true}], [{audio: true}]);
|
|
|
|
|
test.chain.removeAfter("PC_LOCAL_CREATE_OFFER");
|
2013-05-17 06:47:50 +04:00
|
|
|
|
|
2015-01-29 01:05:56 +03:00
|
|
|
|
test.chain.append([
|
|
|
|
|
function PC_LOCAL_SET_LOCAL_ANSWER(test) {
|
|
|
|
|
test.pcLocal._latest_offer.type = "answer";
|
|
|
|
|
return test.pcLocal.setLocalDescriptionAndFail(test.pcLocal._latest_offer)
|
|
|
|
|
.then(err => {
|
|
|
|
|
is(err.name, "InvalidStateError", "Error is InvalidStateError");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
]);
|
2013-05-17 06:47:50 +04:00
|
|
|
|
|
2015-01-29 01:05:56 +03:00
|
|
|
|
test.run();
|
|
|
|
|
});
|
2013-05-17 06:47:50 +04:00
|
|
|
|
</script>
|
|
|
|
|
</pre>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|