blob: 2b50d210020f77a1f6e4578bb458c1c7f9f3ab24 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
<script>
description('This tests the XMLHttpRequest responseXML attribute value when given invalid XML data.');
window.jsTestIsAsync = true;
var xhr = new XMLHttpRequest(),
url = 'resources/xmlhttprequest-get-invalid-data.xml';
xhr.onload = function() {
shouldEvaluateTo('xhr.readyState', 4);
shouldBeNull('xhr.responseXML');
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>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
</body>
</html>