blob: f3bfe28aa6c1c33c9dbb22b468cbf8f1dac8b724 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html lang="en">
<head>
<title>responseXML</title>
</head>
<body>
<p>FAIL: Script did not run.</p>
<script type="text/javascript">
if (window.testRunner)
testRunner.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', '010-test.cgi', false);
r.send(null);
p.firstChild.data = r.responseXML ?
r.responseXML.documentElement ?
r.responseXML.documentElement.tagName == 'test' ? 'PASS'
: 'FAIL: wrong tagName: ' + r.responseXML.documentElement.tagName
: 'FAIL: no documentElement in ' + r.responseXML
: 'FAIL: no document in ' + r;
</script>
</body>
</html>