tor-browser

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

test_messageChannel_forceClose.html (755B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=1176034
      5 -->
      6 <head>
      7  <meta charset="utf-8">
      8  <title>Test for Bug 1176034 - start/close</title>
      9  <script src="/tests/SimpleTest/SimpleTest.js"></script>
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     11 </head>
     12 <body>
     13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1176034">Mozilla Bug 1176034</a>
     14 <div id="content"></div>
     15 <pre id="test">
     16 </pre>
     17  <script type="application/javascript">
     18 
     19  var mc = new MessageChannel();
     20 
     21  try {
     22    postMessage(42, "*", [ mc.port1, window ]);
     23    ok(false, "Something went wrong.");
     24  } catch(e) {
     25    ok(true, "PostMessage should fail and we should not leak.");
     26  }
     27 
     28  </script>
     29 </body>
     30 </html>