This commit is contained in:
Adam Roach [:abr] 2013-01-24 12:11:08 -06:00
Родитель 309a81e0a4
Коммит 70e37be425
2 изменённых файлов: 55 добавлений и 0 удалений

Просмотреть файл

@ -21,6 +21,7 @@ MOCHITEST_FILES = \
test_peerConnection_basicVideo.html \
test_peerConnection_bug827843.html \
test_peerConnection_bug825703.html \
test_peerConnection_bug834153.html \
head.js \
mediaStreamPlayback.js \
pc.js \

Просмотреть файл

@ -0,0 +1,54 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=834153
-->
<head>
<meta charset="utf-8">
<title>Bug 834153: Queue CreateAnswer in PeerConnection.js</title>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript" src="/MochiKit/MochiKit.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="head.js"></script>
</meta>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=834153">Queue CreateAnswer in PeerConnection.js</a>
<p id="display"></p>
<pre id="test">
<script class="testbody" type="application/javascript">
function croak(msg) {
ok(0,msg);
SimpleTest.finish();
}
runTest(function () {
var pc1;
pc1 = new mozRTCPeerConnection();
ok(pc1, "pc1 is non-null");
pc1.createOffer(
function(d) {
pc2 = new mozRTCPeerConnection();
ok(pc2, "pc2 is non-null");
// The whole point of this test is not to wait for the
// setRemoteDescription call to succesfully complete, so we
// don't do anything in its callbacks.
pc2.setRemoteDescription(d,function(x){},function(x){});
pc2.createAnswer(
function (d) {
is(d.type,"answer","CreateAnswer created an answer");
SimpleTest.finish();
},
function(err){croak("createAnswer failed: " + err);}
);
},
function(err){croak("createOffer failed: " + err);}
);
}, true);
</script>
</pre>
</body>
</html>