| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../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="../../resources/js-test-post.js"></script> |
| </head> |
| <body> |
| <div id="description"></div> |
| <div id="console"></div> |
| </body> |
| </html> |