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

Unified Diff: LayoutTests/fast/dom/DOMImplementation/createDocument-XMLDocument.html

Issue 144063004: Add support for DOM4's XMLDocument interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add layout test Created 6 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
Index: LayoutTests/fast/dom/DOMImplementation/createDocument-XMLDocument.html
diff --git a/LayoutTests/fast/dom/DOMImplementation/createDocument-XMLDocument.html b/LayoutTests/fast/dom/DOMImplementation/createDocument-XMLDocument.html
new file mode 100644
index 0000000000000000000000000000000000000000..0158425155d1b1f20fe94785e063fb9f8ad39330
--- /dev/null
+++ b/LayoutTests/fast/dom/DOMImplementation/createDocument-XMLDocument.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+description('Check that DOMImplementation.createDocument() returns an XMLDocument.');
+
+shouldBeEqualToString('window.XMLDocument.name', 'XMLDocument');
+
+shouldBe('document.implementation.createDocument("", "").__proto__', 'XMLDocument.prototype');
arv (Not doing code reviews) 2014/01/22 15:24:19 Can you also add a test that XMLDocument.prototype
Inactive 2014/01/22 15:39:26 Good idea, will do.
Inactive 2014/01/22 15:51:52 Done.
+shouldBe('document.implementation.createDocument("", "html").__proto__', 'XMLDocument.prototype');
+shouldBe('document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html").__proto__', 'XMLDocument.prototype');
+shouldBe('document.implementation.createDocument("http://www.w3.org/2000/xmlns/", "xmlns:test").__proto__', 'XMLDocument.prototype');
+// FIXME: This is not passing yet, this currently returns an SVGDocument which is no longer part of SVG2.
+shouldBe('document.implementation.createDocument("http://www.w3.org/2000/svg", "svg").__proto__', 'XMLDocument.prototype');
+</script>
+</body>
+</html>
+

Powered by Google App Engine
This is Rietveld 408576698