tor-browser

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

audioworkletnode-after-unload-1.html (807B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3 <head>
      4 <title>Test for bug 1634200 and bug 1655544</title>
      5 <script>
      6 document.addEventListener('DOMContentLoaded', async () => {
      7  const frame = document.createElement('iframe');
      8  document.body.appendChild(frame);
      9  frame.srcdoc = '<html></html>';
     10  await new Promise(resolve => frame.onload = resolve);
     11 
     12  const subwin = frame.contentWindow;
     13  const ctx = new subwin.AudioContext();
     14  const url = URL.createObjectURL(
     15    new Blob([`registerProcessor("noop",
     16                                 class extends AudioWorkletProcessor {})`]),
     17    {type: "application/javascript"});
     18  await ctx.audioWorklet.addModule(url);
     19 
     20  frame.remove();
     21  new subwin.AudioWorkletNode(ctx, 'noop')
     22 
     23  document.documentElement.removeAttribute('class');
     24 });
     25 </script>
     26 </head>
     27 </html>