summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/dom/abort/crashtests/timeout-close.html
blob: ee8544a7f57edb8cac05e94dbd836eac20a37b85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<html class="test-wait">
<meta charset="utf-8">
<iframe id="iframe"></iframe>
<script>
  const srcdoc = `
    <!DOCTYPE html>
    <meta charset="utf-8">
    <script>
      const xhr = new XMLHttpRequest()
      setTimeout(() => {
        xhr.open('GET', '/', false)
        xhr.send()
        AbortSignal.timeout(41.62684667994843)
      }, 1)
      setTimeout(() => {
        location.href = "about:blank"
        parent.document.documentElement.classList.remove("test-wait")
      }, 0)
    </` + "script>";
  iframe.srcdoc = srcdoc;
</script>