https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 8ee803e171bc0b0d5e93bebd4a56e3200f08421d authored by Chris Rebert on 29 December 2016, 03:02:36 UTC
Add test for MouseEvent.toElement & MouseEvent.fromElement
Tip revision: 8ee803e
open-url-multi-window-3.htm
<!doctype html>
<html>
  <head>
    <title>XMLHttpRequest: open() resolving URLs (multi-Window; 3; evil)</title>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
  </head>
  <body>
    <div id="log"></div>
    <script>
      function init() {
        test(function() {
          var client = new self[0].XMLHttpRequest()
          client.open("GET", "folder.txt")
          document.body.removeChild(document.getElementsByTagName("iframe")[0])
          assert_throws("InvalidStateError", function() { 
            client.send(null)
          }, "send() when associated document's IFRAME is removed")
        })
      }
    </script>
    <iframe src="resources/init.htm"></iframe>
 </body>
</html>
back to top