Skip to content

Commit 7f70c01

Browse files
fippochromium-wpt-export-bot
authored andcommitted
webrtc wpt: assert that RTCIceTransport does not show remote candidates
as stipulated in https://w3c.github.io/webrtc-pc/#dom-rtcicetransport-getremotecandidates This demonstrates that the ICE transport does not have the problem addressed by https://webrtc-review.googlesource.com/c/src/+/366562 BUG=None Change-Id: I5f3aebef9c93264bca283ac2d7b1f55b7479de07 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6307264 Reviewed-by: Harald Alvestrand <[email protected]> Reviewed-by: Guido Urdaneta <[email protected]> Commit-Queue: Philipp Hancke <[email protected]> Cr-Commit-Position: refs/heads/main@{#1425945}
1 parent b04c7a7 commit 7f70c01

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

webrtc/RTCIceTransport.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,4 +468,20 @@
468468
assert_equals(result, undefined, 'statechange event should not fire when transitioning to closed due to PC.close()');
469469
}, 'RTCIceTransport should synchronously transition to "closed" with no event if the underlying transport is closed due to PC.close()');
470470

471+
promise_test(async t => {
472+
const pc1 = new RTCPeerConnection();
473+
t.add_cleanup(() => pc1.close());
474+
const pc2 = new RTCPeerConnection();
475+
t.add_cleanup(() => pc2.close());
476+
const {sender} = pc1.addTransceiver('audio');
477+
478+
// Candidates only go in one direction, like in webrtc-stats/getStats-remote-candidate-address.html
479+
// This means the remote candidates are peer-reflexive candidates.
480+
pc1.onicecandidate = e => pc2.addIceCandidate(e.candidate);
481+
exchangeOfferAnswer(pc1, pc2);
482+
await listenToConnected(pc1);
483+
484+
assert_equals(sender.transport.iceTransport.getRemoteCandidates().length, 0);
485+
}, 'RTCIceTransport does not expose remote peer-reflexive candidates.');
486+
471487
</script>

0 commit comments

Comments
 (0)