tor-browser

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

test_1717318.html (761B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <title>PC construct with no global object (bug 1717318)</title>
      5  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      6  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
      7 </head>
      8 <body>
      9 <script class="testbody" type="text/javascript">
     10 "use strict";
     11 
     12 // nsIArray is not special here, it could be pretty much any interface.
     13 // We do this outside the try block just in case someday the interface is
     14 // removed.
     15 const dummyInterface = SpecialPowers.Components.interfaces.nsIArray;
     16 ok(dummyInterface, "nsIArray should exist");
     17 try {
     18  // Just don't crash.
     19  SpecialPowers.Components.classes["@mozilla.org/peerconnection;1"]
     20      .createInstance(dummyInterface);
     21 } catch (e) {}
     22 
     23 </script>
     24 </body>
     25 </html>