summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/Node/script-tests/isEqualNode.js
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast/dom/Node/script-tests/isEqualNode.js')
-rw-r--r--LayoutTests/fast/dom/Node/script-tests/isEqualNode.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/Node/script-tests/isEqualNode.js b/LayoutTests/fast/dom/Node/script-tests/isEqualNode.js
new file mode 100644
index 0000000..c56199b
--- /dev/null
+++ b/LayoutTests/fast/dom/Node/script-tests/isEqualNode.js
@@ -0,0 +1,13 @@
+description("Test the isEqualNode API.");
+
+debug("Test isEqualNode for DocumentType nodes.");
+var docTypeAllSet = document.implementation.createDocumentType('html', '-//W3C//DTD XHTML 1.0 Strict//EN', 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
+var docTypeAllSet2 = document.implementation.createDocumentType('html', '-//W3C//DTD XHTML 1.0 Strict//EN', 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
+var docTypeDifferentPublicID = document.implementation.createDocumentType('html', 'foo', 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
+var docTypeDifferentSystemID = document.implementation.createDocumentType('html', '-//W3C//DTD XHTML 1.0 Strict//EN', 'bar');
+
+shouldBeTrue("docTypeAllSet.isEqualNode(docTypeAllSet2)");
+shouldBeFalse("docTypeAllSet.isEqualNode(docTypeDifferentPublicID)");
+shouldBeFalse("docTypeAllSet.isEqualNode(docTypeDifferentSystemID)");
+
+var successfullyParsed = true;