Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Unified Diff: LayoutTests/http/tests/xmlhttprequest/responsexml-type.html

Issue 802123003: Adding LayoutTest for testing XMLHttpRequest.responseXML returns an XMLDocument. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/responsexml-type-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/responsexml-type-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698