зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1253706: Web-platform-tests for bug. r=jib
Re-enable several tests, and add some ICE testing using iceTransportPolicy. Cannot test ICE servers, since wpt does not have any harness support for that. Differential Revision: https://phabricator.services.mozilla.com/D135361
This commit is contained in:
Родитель
407b7b07ef
Коммит
5467f16d85
|
@ -1,8 +1,4 @@
|
|||
[RTCCertificate.html]
|
||||
[Calling setConfiguration with different set of certs should reject with InvalidModificationError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[RTCCertificate should have at least one fingerprint]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1525241
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
[RTCConfiguration-bundlePolicy.html]
|
||||
[setConfiguration({}) with initial default bundlePolicy balanced should succeed]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
|
||||
[setConfiguration({}) with initial bundlePolicy balanced should succeed]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
|
||||
[setConfiguration({ bundlePolicy: balanced }) with initial default bundlePolicy balanced should succeed]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
|
||||
[setConfiguration({ bundlePolicy: 'balanced' }) with initial bundlePolicy balanced should succeed]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
|
||||
[setConfiguration({ bundlePolicy: 'max-compat' }) with initial bundlePolicy max-compat should succeed]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
|
||||
[setConfiguration({ bundlePolicy: 'max-bundle' }) with initial bundlePolicy max-bundle should succeed]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
|
||||
[setConfiguration({ bundlePolicy: 'max-compat' }) with initial bundlePolicy max-bundle should throw InvalidModificationError]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
|
||||
[setConfiguration({}) with initial bundlePolicy max-bundle should throw InvalidModificationError]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
|
|
@ -1,145 +1,33 @@
|
|||
[RTCConfiguration-iceServers.html]
|
||||
[setConfiguration(config) - {} should succeed]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - { iceServers: null } should throw TypeError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - { iceServers: undefined } should succeed]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - { iceServers: [\] } should succeed]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - { iceServers: [null\] } should throw TypeError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - { iceServers: [undefined\] } should throw TypeError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - { iceServers: [{}\] } should throw TypeError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with stun server should succeed]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with stun server array should succeed]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with 2 stun servers should succeed]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with turn server, username, credential should succeed]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with turns server and empty string username, credential should succeed]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with turn server and empty string username, credential should succeed]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with one turns server, one turn server, username, credential should succeed]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with stun server and credentialType password should succeed]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with turn server and no credentials should throw InvalidAccessError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with turn server and only username should throw InvalidAccessError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with turn server and only credential should throw InvalidAccessError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with turns server and no credentials should throw InvalidAccessError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with turns server and only username should throw InvalidAccessError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with turns server and only credential should throw InvalidAccessError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with "" url should throw SyntaxError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with ["stun:stun1.example.net", ""\] url should throw SyntaxError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with relative url should throw SyntaxError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with http url should throw SyntaxError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[new RTCPeerConnection(config) - with invalid turn url should throw SyntaxError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1529588
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with invalid turn url should throw SyntaxError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[new RTCPeerConnection(config) - with invalid stun url should throw SyntaxError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1529588
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with invalid stun url should throw SyntaxError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with invalid credentialType should throw TypeError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with credentialType token should throw TypeError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[new RTCPeerConnection(config) - with url field should throw TypeError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1116766
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with url field should throw TypeError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with empty urls should throw SyntaxError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
|
||||
[new RTCPeerConnection(config) - with turns server, credentialType password, and object credential should throw InvalidAccessError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1529588
|
||||
expected: FAIL
|
||||
|
||||
[setConfiguration(config) - with turns server, credentialType password, and object credential should throw InvalidAccessError]
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1529588
|
||||
|
||||
[new RTCPeerConnection(config) - with turns server, credentialType password, and object credential should throw InvalidAccessError]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1529588
|
||||
|
||||
[setConfiguration(config) - with url field should throw TypeError]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1529588
|
||||
|
||||
[new RTCPeerConnection(config) - with url field should throw TypeError]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1529588
|
||||
|
||||
[setConfiguration(config) - with invalid stun url should throw SyntaxError]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1529588
|
||||
|
||||
[new RTCPeerConnection(config) - with invalid stun url should throw SyntaxError]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1529588
|
||||
|
||||
[setConfiguration(config) - with invalid turn url should throw SyntaxError]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1529588
|
||||
|
||||
[new RTCPeerConnection(config) - with invalid turn url should throw SyntaxError]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1529588
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
[RTCConfiguration-iceTransportPolicy.html]
|
||||
[setConfiguration({ iceTransportPolicy: 'relay' }) with initial iceTransportPolicy all should succeed]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
|
||||
[setConfiguration({ iceTransportPolicy: 'all' }) with initial iceTransportPolicy relay should succeed]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
|
||||
[setConfiguration({}) with initial iceTransportPolicy relay should set new value to all]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
|
||||
[setConfiguration(config) - with invalid iceTransportPolicy should throw TypeError]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
|
||||
[setConfiguration(config) - with none iceTransportPolicy should throw TypeError]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
|
||||
[setConfiguration(config) - with null iceTransportPolicy should throw TypeError]
|
||||
expected: FAIL
|
||||
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1253706
|
||||
|
|
@ -449,15 +449,9 @@
|
|||
[RTCRtpTransceiver interface: operation setCodecPreferences(sequence<RTCRtpCodecCapability>)]
|
||||
expected: FAIL
|
||||
|
||||
[RTCPeerConnection interface: new RTCPeerConnection() must inherit property "setConfiguration(optional RTCConfiguration)" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[RTCRtpSender interface: operation setStreams(MediaStream...)]
|
||||
expected: FAIL
|
||||
|
||||
[RTCPeerConnection interface: operation setConfiguration(optional RTCConfiguration)]
|
||||
expected: FAIL
|
||||
|
||||
[RTCRtpSender interface: new RTCPeerConnection().addTransceiver('audio').sender must inherit property "setStreams(MediaStream...)" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -470,9 +464,6 @@
|
|||
[RTCRtpSender interface: calling setStreams(MediaStream...) on new RTCPeerConnection().addTransceiver('audio').sender with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[RTCPeerConnection interface: calling setConfiguration(optional RTCConfiguration) on new RTCPeerConnection() with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[RTCPeerConnection interface: operation setRemoteDescription(RTCSessionDescriptionInit, VoidFunction, RTCPeerConnectionErrorCallback)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
4.2.1. RTCConfiguration Dictionary
|
||||
dictionary RTCConfiguration {
|
||||
sequence<RTCIceServer> iceServers;
|
||||
sequence<RTCIceServer> iceServers = [];
|
||||
...
|
||||
};
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
|||
|
||||
test(() => {
|
||||
const pc = new RTCPeerConnection();
|
||||
assert_equals(pc.getConfiguration().iceServers, undefined);
|
||||
assert_array_equals(pc.getConfiguration().iceServers, []);
|
||||
}, 'new RTCPeerConnection() should have default configuration.iceServers of undefined');
|
||||
|
||||
config_test(makePc => {
|
||||
|
@ -57,7 +57,7 @@
|
|||
|
||||
config_test(makePc => {
|
||||
const pc = makePc({ iceServers: undefined });
|
||||
assert_equals(pc.getConfiguration().iceServers, undefined);
|
||||
assert_array_equals(pc.getConfiguration().iceServers, []);
|
||||
}, '{ iceServers: undefined } should succeed');
|
||||
|
||||
config_test(makePc => {
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<!doctype html>
|
||||
<meta name="timeout" content="long">
|
||||
<title>RTCConfiguration iceTransportPolicy</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="RTCConfiguration-helper.js"></script>
|
||||
<script src="RTCPeerConnection-helper.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
|
@ -116,4 +118,189 @@
|
|||
assert_equals(pc.getConfiguration().iceTransportPolicy, 'all');
|
||||
}, `new RTCPeerConnection({ iceTransports: null }) should have no effect`);
|
||||
|
||||
const getLines = (sdp, startsWith) =>
|
||||
sdp.split('\r\n').filter(l => l.startsWith(startsWith));
|
||||
|
||||
const getUfrags = ({sdp}) => getLines(sdp, 'a=ice-ufrag:');
|
||||
|
||||
promise_test(async t => {
|
||||
const offerer = new RTCPeerConnection({iceTransportPolicy: 'relay'});
|
||||
t.add_cleanup(() => offerer.close());
|
||||
|
||||
offerer.addEventListener('icecandidate',
|
||||
e => assert_equals(e.candidate, null, 'Should get no ICE candidates'));
|
||||
|
||||
offerer.addTransceiver('audio');
|
||||
await offerer.setLocalDescription();
|
||||
|
||||
await waitForIceGatheringState(offerer, ['complete']);
|
||||
}, `iceTransportPolicy "relay" on offerer should prevent candidate gathering`);
|
||||
|
||||
promise_test(async t => {
|
||||
const offerer = new RTCPeerConnection();
|
||||
const answerer = new RTCPeerConnection({iceTransportPolicy: 'relay'});
|
||||
t.add_cleanup(() => offerer.close());
|
||||
t.add_cleanup(() => answerer.close());
|
||||
|
||||
answerer.addEventListener('icecandidate',
|
||||
e => assert_equals(e.candidate, null, 'Should get no ICE candidates'));
|
||||
|
||||
offerer.addTransceiver('audio');
|
||||
const offer = await offerer.createOffer();
|
||||
await answerer.setRemoteDescription(offer);
|
||||
await answerer.setLocalDescription(await answerer.createAnswer());
|
||||
await waitForIceGatheringState(answerer, ['complete']);
|
||||
}, `iceTransportPolicy "relay" on answerer should prevent candidate gathering`);
|
||||
|
||||
promise_test(async t => {
|
||||
const offerer = new RTCPeerConnection();
|
||||
const answerer = new RTCPeerConnection();
|
||||
t.add_cleanup(() => offerer.close());
|
||||
t.add_cleanup(() => answerer.close());
|
||||
|
||||
offerer.addTransceiver('audio');
|
||||
|
||||
exchangeIceCandidates(offerer, answerer);
|
||||
|
||||
await Promise.all([
|
||||
exchangeOfferAnswer(offerer, answerer),
|
||||
listenToIceConnected(offerer),
|
||||
listenToIceConnected(answerer),
|
||||
waitForIceGatheringState(offerer, ['complete']),
|
||||
waitForIceGatheringState(answerer, ['complete'])
|
||||
]);
|
||||
|
||||
const [oldUfrag] = getUfrags(offerer.localDescription);
|
||||
|
||||
offerer.setConfiguration({iceTransportPolicy: 'relay'});
|
||||
|
||||
offerer.addEventListener('icecandidate',
|
||||
e => assert_equals(e.candidate, null, 'Should get no ICE candidates'));
|
||||
|
||||
await Promise.all([
|
||||
exchangeOfferAnswer(offerer, answerer),
|
||||
waitForIceStateChange(offerer, ['failed']),
|
||||
waitForIceStateChange(answerer, ['failed']),
|
||||
waitForIceGatheringState(offerer, ['complete']),
|
||||
waitForIceGatheringState(answerer, ['complete'])
|
||||
]);
|
||||
|
||||
const [newUfrag] = getUfrags(offerer.localDescription);
|
||||
assert_not_equals(oldUfrag, newUfrag,
|
||||
'Changing iceTransportPolicy should prompt an ICE restart');
|
||||
}, `Changing iceTransportPolicy from "all" to "relay" causes an ICE restart which should fail, with no new candidates`);
|
||||
|
||||
promise_test(async t => {
|
||||
const offerer = new RTCPeerConnection({iceTransportPolicy: 'relay'});
|
||||
const answerer = new RTCPeerConnection();
|
||||
t.add_cleanup(() => offerer.close());
|
||||
t.add_cleanup(() => answerer.close());
|
||||
|
||||
offerer.addTransceiver('audio');
|
||||
|
||||
exchangeIceCandidates(offerer, answerer);
|
||||
|
||||
const checkNoCandidate =
|
||||
e => assert_equals(e.candidate, null, 'Should get no ICE candidates');
|
||||
|
||||
offerer.addEventListener('icecandidate', checkNoCandidate);
|
||||
|
||||
await Promise.all([
|
||||
exchangeOfferAnswer(offerer, answerer),
|
||||
waitForIceStateChange(offerer, ['failed']),
|
||||
waitForIceStateChange(answerer, ['failed']),
|
||||
waitForIceGatheringState(offerer, ['complete']),
|
||||
waitForIceGatheringState(answerer, ['complete'])
|
||||
]);
|
||||
|
||||
const [oldUfrag] = getUfrags(offerer.localDescription);
|
||||
|
||||
offerer.setConfiguration({iceTransportPolicy: 'all'});
|
||||
|
||||
offerer.removeEventListener('icecandidate', checkNoCandidate);
|
||||
|
||||
await Promise.all([
|
||||
exchangeOfferAnswer(offerer, answerer),
|
||||
listenToIceConnected(offerer),
|
||||
listenToIceConnected(answerer),
|
||||
waitForIceGatheringState(offerer, ['complete']),
|
||||
waitForIceGatheringState(answerer, ['complete'])
|
||||
]);
|
||||
|
||||
const [newUfrag] = getUfrags(offerer.localDescription);
|
||||
assert_not_equals(oldUfrag, newUfrag,
|
||||
'Changing iceTransportPolicy should prompt an ICE restart');
|
||||
}, `Changing iceTransportPolicy from "relay" to "all" causes an ICE restart which should succeed`);
|
||||
|
||||
promise_test(async t => {
|
||||
const offerer = new RTCPeerConnection();
|
||||
const answerer = new RTCPeerConnection();
|
||||
t.add_cleanup(() => offerer.close());
|
||||
t.add_cleanup(() => answerer.close());
|
||||
|
||||
offerer.addTransceiver('audio');
|
||||
|
||||
exchangeIceCandidates(offerer, answerer);
|
||||
|
||||
await Promise.all([
|
||||
exchangeOfferAnswer(offerer, answerer),
|
||||
listenToIceConnected(offerer),
|
||||
listenToIceConnected(answerer),
|
||||
waitForIceGatheringState(offerer, ['complete']),
|
||||
waitForIceGatheringState(answerer, ['complete'])
|
||||
]);
|
||||
|
||||
const [oldUfrag] = getUfrags(offerer.localDescription);
|
||||
|
||||
offerer.setConfiguration({iceTransportPolicy: 'relay'});
|
||||
offerer.setConfiguration({iceTransportPolicy: 'all'});
|
||||
|
||||
await Promise.all([
|
||||
exchangeOfferAnswer(offerer, answerer),
|
||||
listenToIceConnected(offerer),
|
||||
listenToIceConnected(answerer),
|
||||
waitForIceGatheringState(offerer, ['complete']),
|
||||
waitForIceGatheringState(answerer, ['complete'])
|
||||
]);
|
||||
|
||||
const [newUfrag] = getUfrags(offerer.localDescription);
|
||||
assert_not_equals(oldUfrag, newUfrag,
|
||||
'Changing iceTransportPolicy should prompt an ICE restart');
|
||||
}, `Changing iceTransportPolicy from "all" to "relay", and back to "all" prompts an ICE restart`);
|
||||
|
||||
promise_test(async t => {
|
||||
const offerer = new RTCPeerConnection();
|
||||
const answerer = new RTCPeerConnection();
|
||||
t.add_cleanup(() => offerer.close());
|
||||
t.add_cleanup(() => answerer.close());
|
||||
|
||||
offerer.addTransceiver('audio');
|
||||
|
||||
exchangeIceCandidates(offerer, answerer);
|
||||
|
||||
await Promise.all([
|
||||
exchangeOfferAnswer(offerer, answerer),
|
||||
listenToIceConnected(offerer),
|
||||
listenToIceConnected(answerer),
|
||||
waitForIceGatheringState(offerer, ['complete']),
|
||||
waitForIceGatheringState(answerer, ['complete'])
|
||||
]);
|
||||
|
||||
const [oldUfrag] = getUfrags(answerer.localDescription);
|
||||
|
||||
answerer.setConfiguration({iceTransportPolicy: 'relay'});
|
||||
|
||||
await Promise.all([
|
||||
exchangeOfferAnswer(offerer, answerer),
|
||||
listenToIceConnected(offerer),
|
||||
listenToIceConnected(answerer),
|
||||
waitForIceGatheringState(offerer, ['complete']),
|
||||
waitForIceGatheringState(answerer, ['complete'])
|
||||
]);
|
||||
|
||||
const [newUfrag] = getUfrags(answerer.localDescription);
|
||||
assert_equals(oldUfrag, newUfrag,
|
||||
'Changing iceTransportPolicy on answerer should not effect ufrag');
|
||||
}, `Changing iceTransportPolicy from "all" to "relay" on the answerer has no effect on a subsequent offer/answer`);
|
||||
|
||||
</script>
|
||||
|
|
Загрузка…
Ссылка в новой задаче