Use testRunner instead of layoutTestController in tests still found to be using layou...
[WebKit-https.git] / LayoutTests / http / tests / xmlhttprequest / reentrant-cancel.html
1 <script>
2 if (window.testRunner)
3     testRunner.dumpAsText();
4
5 function addElement() {
6     document.documentElement.appendChild(document.createTextNode('X'));
7 }
8 document.addEventListener("DOMContentLoaded", addElement, false);
9 window.onload = addElement;
10
11 var xhr = new XMLHttpRequest;
12 function sendXHR()
13 {
14     xhr.open("GET", "", true);
15     xhr.send();
16 }
17 window.addEventListener("DOMSubtreeModified", sendXHR);
18 addElement();
19 </script>
20 This tests that when we re-entrantly create and cancel XHRs, we don't try to disconnect the same CachedResourceClient
21 multiple times from its CachedResource. We pass if we don't crash.