Also, update a couple of wpt with canned SDP that is invalid under rtcpMuxPolicy: "require". Differential Revision: https://phabricator.services.mozilla.com/D295097
107 lines
2.7 KiB
HTML
107 lines
2.7 KiB
HTML
<!doctype html>
|
|
<meta charset=utf-8>
|
|
<meta name="variant" content="?interop-2026">
|
|
<meta name="variant" content="?rest">
|
|
<title>Historical WebRTC features</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="RTCConfiguration-helper.js"></script>
|
|
<div id="log"></div>
|
|
<script>
|
|
const rest = !new URLSearchParams(location.search).has("interop-2026");
|
|
const interop2026 = !new URLSearchParams(location.search).has("rest");
|
|
if (interop2026) {
|
|
[
|
|
'reliable',
|
|
].forEach((member) => {
|
|
test(() => {
|
|
assert_false(member in RTCDataChannel.prototype);
|
|
}, `RTCDataChannel member ${member} should not exist`);
|
|
});
|
|
}
|
|
if (rest) {
|
|
[
|
|
'maxRetransmitTime',
|
|
].forEach((member) => {
|
|
test(() => {
|
|
assert_false(member in RTCDataChannel.prototype);
|
|
}, `RTCDataChannel member ${member} should not exist`);
|
|
});
|
|
}
|
|
|
|
if (interop2026) {
|
|
[
|
|
"createDTMFSender",
|
|
"onremovestream",
|
|
"removeStream",
|
|
].forEach(function(name) {
|
|
test(function() {
|
|
assert_false(name in RTCPeerConnection.prototype);
|
|
}, "RTCPeerConnection member " + name + " should not exist");
|
|
});
|
|
}
|
|
if (rest) {
|
|
[
|
|
"addStream",
|
|
"getLocalStreams",
|
|
"getRemoteStreams",
|
|
"getStreamById",
|
|
"onaddstream",
|
|
"updateIce",
|
|
].forEach(function(name) {
|
|
test(function() {
|
|
assert_false(name in RTCPeerConnection.prototype);
|
|
}, "RTCPeerConnection member " + name + " should not exist");
|
|
});
|
|
|
|
[
|
|
"setDirection",
|
|
].forEach(function(name) {
|
|
test(function() {
|
|
assert_false(name in RTCRtpTransceiver.prototype);
|
|
}, "RTCRtpTransceiver member " + name + " should not exist");
|
|
});
|
|
|
|
[
|
|
"DataChannel",
|
|
"mozRTCIceCandidate",
|
|
"mozRTCPeerConnection",
|
|
"mozRTCSessionDescription",
|
|
].forEach(function(name) {
|
|
test(function() {
|
|
assert_false(name in window);
|
|
}, name + " interface should not exist");
|
|
});
|
|
}
|
|
if (interop2026) {
|
|
[
|
|
"webkitRTCPeerConnection",
|
|
].forEach(function(name) {
|
|
test(function() {
|
|
assert_false(name in window);
|
|
}, name + " interface should not exist");
|
|
});
|
|
}
|
|
if (rest) {
|
|
// Blink and Gecko fall back to url, but it's not in the spec.
|
|
config_test(makePc => {
|
|
assert_throws_js(TypeError, () =>
|
|
makePc({ iceServers: [{
|
|
url: 'stun:stun1.example.net'
|
|
}] }));
|
|
}, 'with url field should throw TypeError');
|
|
|
|
// "negotiate" was removed from the RTCRtcpMuxPolicy enum.
|
|
test(() => {
|
|
assert_throws_js(TypeError, () =>
|
|
new RTCPeerConnection({ rtcpMuxPolicy: 'negotiate' }));
|
|
}, 'RTCPeerConnection with rtcpMuxPolicy "negotiate" should throw TypeError');
|
|
|
|
test(() => {
|
|
const pc = new RTCPeerConnection();
|
|
assert_throws_js(TypeError, () =>
|
|
pc.setConfiguration({ rtcpMuxPolicy: 'negotiate' }));
|
|
}, 'setConfiguration with rtcpMuxPolicy "negotiate" should throw TypeError');
|
|
}
|
|
</script>
|