tor-browser

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

prompt-in-detached-iframe.html (552B)


      1 <!DOCTYPE html>
      2 <body>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script>
      6 promise_test(t => {
      7  let i = document.createElement("iframe");
      8  document.body.appendChild(i);
      9  let audio = document.createElement("audio");
     10  i.contentDocument.body.appendChild(audio);
     11  let remote = audio.remote;
     12  i.remove();
     13  return promise_rejects_dom(t, "InvalidAccessError", remote.prompt());
     14 }, 'Calling remote.prompt() in a detached context should throw InvalidAccessError');
     15 </script>
     16 </body>
     17 </html>