michael@0: /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim:set ts=2 sw=2 sts=2 et: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: // tests that depend on DTD features no one cares about michael@0: var dtdTests = ["attrdefaultvalue","attrnotspecifiedvalue", "attrremovechild1", michael@0: "attrreplacechild1", "attrsetvaluenomodificationallowederr", michael@0: "attrsetvaluenomodificationallowederrEE", "attrspecifiedvalueremove", michael@0: "characterdataappenddatanomodificationallowederr", "characterdataappenddatanomodificationallowederrEE", michael@0: "characterdatadeletedatanomodificationallowederr", "characterdatadeletedatanomodificationallowederrEE", michael@0: "characterdatainsertdatanomodificationallowederr", "characterdatainsertdatanomodificationallowederrEE", michael@0: "characterdatareplacedatanomodificationallowederr", "characterdatareplacedatanomodificationallowederrEE", michael@0: "characterdatasetdatanomodificationallowederr", "characterdatasetdatanomodificationallowederrEE", michael@0: "documentcreateelementdefaultattr", "documentcreateentityreference", "documentcreateentityreferenceknown", michael@0: "documenttypegetentities", "documenttypegetentitieslength", "documenttypegetentitiestype", michael@0: "documenttypegetnotations", "documenttypegetnotationstype", "elementremoveattribute", michael@0: "elementremoveattributenodenomodificationallowederr", "elementremoveattributenodenomodificationallowederrEE", michael@0: "elementremoveattributenomodificationallowederr", "elementremoveattributenomodificationallowederrEE", michael@0: "elementremoveattributerestoredefaultvalue", "elementretrieveallattributes", michael@0: "elementsetattributenodenomodificationallowederr", "elementsetattributenodenomodificationallowederrEE", michael@0: "elementsetattributenomodificationallowederr", "elementsetattributenomodificationallowederrEE", michael@0: "entitygetentityname", "entitygetpublicid", "entitygetpublicidnull", "namednodemapremovenameditem", michael@0: "namednodemapremovenameditemgetvalue", "nodeappendchildnomodificationallowederr", "nodeappendchildnomodificationallowederrEE", michael@0: "nodeentitynodeattributes", "nodeentitynodename", "nodeentitynodetype", "nodeentitynodevalue", michael@0: "nodeentityreferencenodeattributes", "nodeentityreferencenodename", "nodeentityreferencenodetype", michael@0: "nodeentityreferencenodevalue", "nodeentitysetnodevalue", "nodeinsertbeforenomodificationallowederr", michael@0: "nodeinsertbeforenomodificationallowederrEE", "nodenotationnodeattributes", "nodenotationnodename", michael@0: "nodenotationnodetype", "nodenotationnodevalue", "noderemovechildnomodificationallowederr", michael@0: "noderemovechildnomodificationallowederrEE", "nodereplacechildnomodificationallowederr", michael@0: "nodereplacechildnomodificationallowederrEE", "nodesetnodevaluenomodificationallowederr", michael@0: "nodesetnodevaluenomodificationallowederrEE", "nodevalue03","nodevalue07", "nodevalue08", michael@0: "notationgetnotationname", "notationgetpublicid", "notationgetpublicidnull", "notationgetsystemid", michael@0: "notationgetsystemidnull", "processinginstructionsetdatanomodificationallowederr", michael@0: "processinginstructionsetdatanomodificationallowederrEE", "textsplittextnomodificationallowederr", michael@0: "textsplittextnomodificationallowederrEE"]; michael@0: michael@0: // we don't pass these, unfortunately michael@0: var indexErrTests = ["characterdataindexsizeerrdeletedatacountnegative", "characterdataindexsizeerrreplacedatacountnegative", michael@0: "characterdataindexsizeerrsubstringcountnegative", "hc_characterdataindexsizeerrdeletedatacountnegative", michael@0: "hc_characterdataindexsizeerrreplacedatacountnegative", "hc_characterdataindexsizeerrsubstringcountnegative"]; michael@0: michael@0: var attributeModTests = ["hc_attrappendchild1", "hc_attrappendchild3", "hc_attrappendchild5", michael@0: "hc_attrappendchild6", "hc_attrchildnodes2", "hc_attrclonenode1", "hc_attrinsertbefore1", michael@0: "hc_attrinsertbefore2", "hc_attrinsertbefore3", "hc_attrinsertbefore4", "hc_attrinsertbefore6", michael@0: "hc_attrnormalize", "hc_attrreplacechild1", "hc_attrreplacechild2", michael@0: "hc_attrsetvalue2", "hc_elementnormalize2", "hc_elementnotfounderr", "hc_elementremoveattribute", "hc_elementnormalize2", michael@0: "hc_elementnotfounderr", "hc_elementremoveattribute", michael@0: "hc_attrchildnodes1", "hc_attrfirstchild", michael@0: "hc_attrhaschildnodes", "hc_attrlastchild", michael@0: "hc_attrremovechild1", "hc_attrsetvalue1"]; michael@0: var modTests = ["hc_elementwrongdocumenterr", "hc_namednodemapwrongdocumenterr", "hc_nodeappendchildnewchilddiffdocument", "hc_nodeinsertbeforenewchilddiffdocument", michael@0: "hc_nodereplacechildnewchilddiffdocument", "hc_elementwrongdocumenterr", "hc_namednodemapwrongdocumenterr", "hc_nodeappendchildnewchilddiffdocument", michael@0: "hc_nodeinsertbeforenewchilddiffdocument", "hc_nodereplacechildnewchilddiffdocument", "elementwrongdocumenterr", "namednodemapwrongdocumenterr", michael@0: "nodeappendchildnewchilddiffdocument", "nodeinsertbeforenewchilddiffdocument", "nodereplacechildnewchilddiffdocument"]; michael@0: // These tests rely on an implementation of document.createEntityReference. michael@0: var createEntityRef = ["documentinvalidcharacterexceptioncreateentref", michael@0: "documentinvalidcharacterexceptioncreateentref1", michael@0: "hc_attrgetvalue2", "hc_nodevalue03"]; michael@0: var createProcessingInstructionHTML = ["documentinvalidcharacterexceptioncreatepi", michael@0: "documentinvalidcharacterexceptioncreatepi1"]; michael@0: // These tests expect Node.attributes to exist. michael@0: var attributesOnNode = [ michael@0: "hc_commentgetcomment", michael@0: "hc_documentgetdoctype", michael@0: "hc_nodeattributenodeattribute", michael@0: "hc_nodecommentnodeattributes", michael@0: "hc_nodecommentnodeattributes", michael@0: "hc_nodedocumentfragmentnodevalue", michael@0: "hc_nodedocumentnodeattribute", michael@0: "hc_nodetextnodeattribute", michael@0: "nodeattributenodeattribute", michael@0: "nodecommentnodeattributes", michael@0: "nodecommentnodeattributes", michael@0: "nodedocumentfragmentnodevalue", michael@0: "nodedocumentnodeattribute", michael@0: "nodeprocessinginstructionnodeattributes", michael@0: "nodetextnodeattribute", michael@0: "nodecdatasectionnodeattribute", michael@0: "nodedocumenttypenodevalue" michael@0: ] michael@0: michael@0: var todoTests = {}; michael@0: function concat(lst/*...*/) { michael@0: var f = []; michael@0: if (arguments !== null) { michael@0: f = arguments[0]; michael@0: } michael@0: for (var i = 1; i < arguments.length; i++) { michael@0: f = f.concat(arguments[i]); michael@0: } michael@0: return f; michael@0: } michael@0: var exclusions = concat(dtdTests, indexErrTests, attributeModTests, modTests, createEntityRef, createProcessingInstructionHTML, attributesOnNode); michael@0: for (var excludedTestName in exclusions) { todoTests[exclusions[excludedTestName]] = true; }