mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-27 20:25:44 +00:00
Bug 834153 - Mochitest. r=ekr
This commit is contained in:
parent
309a81e0a4
commit
70e37be425
@ -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 \
|
||||
|
54
dom/media/tests/mochitest/test_peerConnection_bug834153.html
Normal file
54
dom/media/tests/mochitest/test_peerConnection_bug834153.html
Normal file
@ -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>
|
Loading…
Reference in New Issue
Block a user