tor-browser

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

open-url-multi-window-3.htm (835B)


      1 <!doctype html>
      2 <html>
      3  <head>
      4    <title>XMLHttpRequest: open() resolving URLs (multi-Window; 3; evil)</title>
      5    <script src="/resources/testharness.js"></script>
      6    <script src="/resources/testharnessreport.js"></script>
      7  </head>
      8  <body>
      9    <div id="log"></div>
     10    <script>
     11      function init() {
     12        test(function() {
     13          var client = new self[0].XMLHttpRequest();
     14          let exceptionCtor = self[0].DOMException;
     15          client.open("GET", "folder.txt")
     16          document.body.removeChild(document.getElementsByTagName("iframe")[0])
     17          assert_throws_dom("InvalidStateError", exceptionCtor, function() {
     18            client.send(null)
     19          }, "send() when associated document's IFRAME is removed");
     20        })
     21      }
     22    </script>
     23    <iframe src="resources/init.htm"></iframe>
     24 </body>
     25 </html>