tor-browser

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

test_dataChannel_noOffer.html (755B)


      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: "856319",
     11    title: "Don't offer m=application unless createDataChannel is called first"
     12  });
     13 
     14  runNetworkTest(async function () {
     15    const pc = new RTCPeerConnection();
     16 
     17    // necessary to circumvent bug 864109
     18    const options = { offerToReceiveAudio: true };
     19 
     20    const errorCallback = generateErrorCallback();
     21    try {
     22      const offer = await pc.createOffer(options);
     23      ok(!offer.sdp.includes("m=application"),
     24        "m=application is not contained in the SDP");
     25    } catch(e) {
     26      errorCallback(e);
     27    }
     28  });
     29 
     30 </script>
     31 </pre>
     32 </body>
     33 </html>