mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
54 lines
1.9 KiB
HTML
54 lines
1.9 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<script type="application/javascript" src="head.js"></script>
|
|
<script type="application/javascript" src="pc.js"></script>
|
|
</head>
|
|
<body>
|
|
<pre id="test">
|
|
<script type="application/javascript">
|
|
createHTML({
|
|
bug: "835370",
|
|
title: "PeerConnection.createOffer valid/invalid constraints permutations"
|
|
});
|
|
|
|
runNetworkTest(function () {
|
|
var pconnect = new mozRTCPeerConnection();
|
|
var pconnects = new mozRTCPeerConnection();
|
|
|
|
function step1(offer) {}
|
|
function failed(code) {}
|
|
|
|
var exception = null;
|
|
try { pconnects.createOffer(step1, failed); } catch (e) { exception = e; }
|
|
ok(!exception, "createOffer(step1, failed) succeeds");
|
|
exception = null;
|
|
try { pconnect.createOffer(step1, failed, 1); } catch (e) { exception = e; }
|
|
ok(exception, "createOffer(step1, failed, 1) throws");
|
|
exception = null;
|
|
try { pconnects.createOffer(step1, failed, {}); } catch (e) { exception = e; }
|
|
ok(!exception, "createOffer(step1, failed, {}) succeeds");
|
|
exception = null;
|
|
try {
|
|
pconnect.updateIce();
|
|
} catch (e) {
|
|
ok(e.message.indexOf("updateIce") >= 0, "PeerConnection.js has readable exceptions");
|
|
exception = e;
|
|
}
|
|
ok(exception, "updateIce not yet implemented and throws");
|
|
exception = null;
|
|
try { pconnects.createOffer(step1, failed, { offerToReceiveVideo: false, offerToReceiveAudio: true, MozDontOfferDataChannel: true }); } catch (e) { exception = e; }
|
|
ok(!exception, "createOffer(step1, failed, { offerToReceiveVideo: false, offerToReceiveAudio: true, MozDontOfferDataChannel: true }) succeeds");
|
|
pconnect.close();
|
|
pconnects.close();
|
|
pconnect = null;
|
|
pconnects = null;
|
|
networkTestFinished();
|
|
});
|
|
</script>
|
|
</pre>
|
|
</body>
|
|
</html>
|