blob: 4c13bbaddc442c3f157d9264fd3602a25c16fcc0 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script>
description('This tests the XMLHttpRequest responseXML loading an XML document with responseType "document".');
window.jsTestIsAsync = true;
var xhr = new XMLHttpRequest(),
url = 'resources/xmlhttprequest-get-data.xml',
id3;
xhr.onload = function() {
shouldBeNonNull('xhr.responseXML');
shouldBeTrue('xhr.responseXML instanceof Document');
id3 = xhr.responseXML.getElementById('id3');
shouldBeNonNull('id3');
shouldBeEqualToString('id3.textContent', 'Three');
finishJSTest();
};
xhr.onerror = function() {
testFailed('The XHR request to an existing resource failed: "' + url + '"');
finishJSTest();
};
xhr.open('GET', url);
xhr.responseType = 'document';
xhr.send(null);
</script>
<script src="../../resources/js-test-post.js"></script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
</body>
</html>