Index: LayoutTests/http/tests/xmlhttprequest/responsexml-type.html |
diff --git a/LayoutTests/http/tests/xmlhttprequest/responsexml-type.html b/LayoutTests/http/tests/xmlhttprequest/responsexml-type.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bf59466aa767c9bddfa879c02e250524eb4c64fd |
--- /dev/null |
+++ b/LayoutTests/http/tests/xmlhttprequest/responsexml-type.html |
@@ -0,0 +1,28 @@ |
+<!DOCTYPE html> |
+ |
+<body> |
+<script src="/js-test-resources/js-test.js"></script> |
+<script> |
+description('This tests that XMLHttpRequest.responseXML returns an XMLDocument.'); |
+window.jsTestIsAsync = true; |
+ |
+new Promise(function(resolve, reject) { |
+ var xhr = new XMLHttpRequest(); |
+ xhr.open('GET', 'resources/redirect.php?url=reply2.xml', true); |
+ xhr.responseType = 'document'; |
+ xhr.onreadystatechange = function() { |
+ if (xhr.readyState === 4) { |
+ resolve(xhr); |
+ } |
+ } |
+ xhr.send(); |
+}).then(function(xhr) { |
+ responseDocument = String(xhr.responseXML); |
+ shouldBeEqualToString('responseDocument', '[object XMLDocument]'); |
+}).catch(function(reason) { |
+ testFailed(String(reason)); |
+}).then(finishJSTest, finishJSTest); |
+ |
+</script> |
+</body> |
+</html> |