blob: 09eebd204cc03f32f3cfbf6a7f636bd7bbb9b8f0 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../js/resources/js-test-pre.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>
<script src="../js/resources/js-test-post.js"></script>
</head>
<body>
<div id="description"></div>
<div id="console"></div>
</body>
</html>