4e65b6bb2135080748232fc4b56f3420fa1eafec
[WebKit-https.git] / LayoutTests / http / tests / xmlhttprequest / resources / frame-load-to-cancel.html
1     <html>
2 <head>
3 <script>
4 var rq;
5
6 function loadXMLDoc()
7 {
8     url = 'endlessxml.php';
9
10     rq = false;
11     
12     try {
13       if (window.XMLHttpRequest) {
14         rq = new XMLHttpRequest();
15         rq.overrideMimeType('text/xml');
16         rq.onreadystatechange = readyStateChanged
17         rq.open('GET', url, true);
18         rq.send();
19       }
20     } catch (ex) {
21         rq = false;
22         alert(ex);
23     }
24 }
25
26 function readyStateChanged()
27 {
28     window.parent.dumpRequestStatus(rq);
29 }
30
31 </script>
32 </head>
33 <body onload="loadXMLDoc(); window.parent.subframeLoaded();" onunload="window.parent.log('Iframe unloaded');">
34 <p>This should have an XMLHttpRequest going on inside it</p>
35 </body>
36 </html>