summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/Node/script-tests/isEqualNode.js
blob: c56199bce816eda6ae9e4891feba3f4a809d8c67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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;