| <script src="../js/resources/js-test-pre.js"></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', |
| xhr.onload = function() { |
| shouldBeNonNull('xhr.responseXML'); |
| shouldBeTrue('xhr.responseXML instanceof Document'); |
| id3 = xhr.responseXML.getElementById('id3'); |
| shouldBeEqualToString('id3.textContent', 'Three'); |
| xhr.onerror = function() { |
| testFailed('The XHR request to an existing resource failed: "' + url + '"'); |
| xhr.responseType = 'document'; |
| <script src="../js/resources/js-test-post.js"></script> |
| <div id="description"></div> |