Home | History | Annotate | Download | only in script-tests
      1 description("Test the isEqualNode API.");
      2 
      3 debug("Test isEqualNode for DocumentType nodes.");
      4 var docTypeAllSet = document.implementation.createDocumentType('html', '-//W3C//DTD XHTML 1.0 Strict//EN', 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
      5 var docTypeAllSet2 = document.implementation.createDocumentType('html', '-//W3C//DTD XHTML 1.0 Strict//EN', 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
      6 var docTypeDifferentPublicID = document.implementation.createDocumentType('html', 'foo', 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
      7 var docTypeDifferentSystemID = document.implementation.createDocumentType('html', '-//W3C//DTD XHTML 1.0 Strict//EN', 'bar');
      8 
      9 shouldBeTrue("docTypeAllSet.isEqualNode(docTypeAllSet2)");
     10 shouldBeFalse("docTypeAllSet.isEqualNode(docTypeDifferentPublicID)");
     11 shouldBeFalse("docTypeAllSet.isEqualNode(docTypeDifferentSystemID)");
     12 
     13 var successfullyParsed = true;
     14