d2ef92b3773a7b86515c7583273651a427017f1b
[gecko.git] / test_peerConnection_basicAudioNATRelayTCP.html
blobd2ef92b3773a7b86515c7583273651a427017f1b
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script type="application/javascript" src="pc.js"></script>
5 </head>
6 <body>
7 <pre id="test">
8 <script type="application/javascript">
9 createHTML({
10 bug: "1231975",
11 title: "Basic audio-only peer connection with port dependent NAT that blocks UDP"
12 });
14 var test;
15 runNetworkTest(options => {
16 SpecialPowers.pushPrefEnv(
18 'set': [
19 ['media.peerconnection.nat_simulator.filtering_type', 'PORT_DEPENDENT'],
20 ['media.peerconnection.nat_simulator.mapping_type', 'PORT_DEPENDENT'],
21 ['media.peerconnection.nat_simulator.block_udp', true]
23 }, function (options) {
24 options = options || {};
25 options.expectedLocalCandidateType = "relayed-tcp";
26 options.expectedRemoteCandidateType = "relayed-tcp";
27 // No reason to wait for gathering to complete like the other NAT tests,
28 // since relayed-tcp is the only thing that can work.
29 test = new PeerConnectionTest(options);
30 test.setMediaConstraints([{audio: true}], [{audio: true}]);
31 test.run();
33 }, { useIceServer: true });
34 </script>
35 </pre>
36 </body>
37 </html>