tor-browser

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

startrendering-after-discard.html (819B)


      1 <!doctype html>
      2 <title>Test for rejected promise from startRendering() on an
      3  OfflineAudioContext in a discarded browsing context</title>
      4 <script src=/resources/testharness.js></script>
      5 <script src=/resources/testharnessreport.js></script>
      6 <body></body>
      7 <script>
      8 let context;
      9 let childDOMException;
     10 setup(() => {
     11  const frame = document.createElement('iframe');
     12  document.body.appendChild(frame);
     13  context = new frame.contentWindow.OfflineAudioContext(
     14    {length: 1, sampleRate: 48000});
     15  childDOMException = frame.contentWindow.DOMException;
     16  frame.remove();
     17 });
     18 
     19 promise_test((t) => promise_rejects_dom(
     20  t, 'InvalidStateError', childDOMException, context.startRendering()),
     21             'startRendering()');
     22 // decodeAudioData() is tested in
     23 // offlineaudiocontext-detached-execution-context.html
     24 </script>