tor-browser

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

test_warning_reporter.html (704B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <title>Test for Worklet - Warnings</title>
      5  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      6  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
      7  <script type="application/javascript" src="common.js"></script>
      8 </head>
      9 <body>
     10 
     11 <script type="application/javascript">
     12 function runTestInIframe() {
     13  var audioContext = new AudioContext();
     14  audioContext.audioWorklet.addModule("warning_reporter_worklet.js")
     15  .then(() => {
     16    const node = new AudioWorkletNode(audioContext, "warning");
     17    node.port.onmessage = e => {
     18      ok(e.data.caught, "An error should be caught");
     19      SimpleTest.finish();
     20    }
     21  });
     22 }
     23 </script>
     24 </body>
     25 </html>