blob: b478a4a413e55622674e7aa76a2e28fe708f313e [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html lang="en">
<head>
<title>responseXML and slow loads</title>
</head>
<body>
<p>FAIL: Script did not run.</p>
<script type="text/javascript">
if (window.layoutTestController)
layoutTestController.dumpAsText();
var p = document.getElementsByTagName('p')[0];
p.firstChild.data = 'FAIL: Test script did not finish.';
if (!window.XMLHttpRequest)
window.XMLHttpRequest = function () { return new ActiveXObject("Microsoft.XMLHTTP"); }
var r = new XMLHttpRequest();
r.open('GET', '009-test.cgi', true);
window.setTimeout(function() {
p.firstChild.data = r.responseXML ?
r.responseXML.documentElement ?
r.responseXML.documentElement.tagName == 'test' ? 'FAIL: Incomplete document was parsed'
: 'FAIL: documentElement had wrong tagName (and shouldn\'t exist anyway)'
: 'FAIL: responseXML had documentElement (responseXML should be null)'
: 'PASS';
}, 2000);
p.firstChild.data = 'FAIL: setTimeout did not trigger.';
r.send(null);
</script>
</body>
</html>