gecko-dev/dom/media/tests/mochitest/test_peerConnection_setRemoteAnswerInHaveRemoteOffer.html
Martin Thomson c29940202d Bug 1119593 - Aggressively removing boilerplate on tests, r=drno
Conflicts:
	dom/media/tests/mochitest/test_getUserMedia_exceptions.html

--HG--
extra : rebase_source : 61d146fe146021d9114a67d6577ca749b30e2d69
2015-01-28 14:05:57 -08:00

35 lines
897 B
HTML

<!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: "setRemoteDescription (answer) in 'have-remote-offer'"
});
runNetworkTest(function () {
var test = new PeerConnectionTest();
test.setMediaConstraints([{audio: true}], [{audio: true}]);
test.chain.removeAfter("PC_REMOTE_SET_REMOTE_DESCRIPTION");
test.chain.append([
function PC_REMOTE_SET_REMOTE_ANSWER(test) {
test.pcLocal._latest_offer.type = "answer";
test.pcRemote._pc.setRemoteDescription(test.pcLocal._latest_offer)
.then(generateErrorCallback('setRemoteDescription should fail'),
err =>
is(err.name, "InvalidStateError", "Error is InvalidStateError"));
}
]);
test.run();
});
</script>
</pre>
</body>
</html>