tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_peerConnection_restartIce.html (1086B)


      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: "906986",
     11    title: "Renegotiation: restart ice"
     12  });
     13 
     14  var test;
     15  runNetworkTest(function (options) {
     16    test = new PeerConnectionTest(options);
     17 
     18    addRenegotiation(test.chain,
     19      [
     20        // causes a full, normal ice restart
     21        function PC_LOCAL_SET_OFFER_OPTION(test) {
     22          test.setOfferOptions({ iceRestart: true });
     23        },
     24        // Make sure we don't get the end of gathering racing against the
     25        // setting of the new offer
     26        function PC_LOCAL_WAIT_FOR_END_OF_TRICKLE(test) {
     27          return test.pcLocal.endOfTrickleIce;
     28        },
     29        function PC_LOCAL_SETUP_ICE_HANDLER(test) {
     30          test.pcLocal.setupIceCandidateHandler(test);
     31        },
     32      ]
     33    );
     34 
     35    test.setMediaConstraints([{audio: true}, {video: true}],
     36                             [{audio: true}, {video: true}]);
     37    return test.run();
     38  });
     39 
     40 </script>
     41 </pre>
     42 </body>
     43 </html>