dom/tests/mochitest/dom-level1-core/exclusions.js

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* vim:set ts=2 sw=2 sts=2 et: */
     3 /* This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     8 // tests that depend on DTD features no one cares about
     9 var dtdTests = ["attrdefaultvalue","attrnotspecifiedvalue", "attrremovechild1",
    10                 "attrreplacechild1", "attrsetvaluenomodificationallowederr",
    11                 "attrsetvaluenomodificationallowederrEE", "attrspecifiedvalueremove",
    12                 "characterdataappenddatanomodificationallowederr", "characterdataappenddatanomodificationallowederrEE",
    13                 "characterdatadeletedatanomodificationallowederr", "characterdatadeletedatanomodificationallowederrEE",
    14                 "characterdatainsertdatanomodificationallowederr", "characterdatainsertdatanomodificationallowederrEE",
    15                 "characterdatareplacedatanomodificationallowederr", "characterdatareplacedatanomodificationallowederrEE",
    16                 "characterdatasetdatanomodificationallowederr", "characterdatasetdatanomodificationallowederrEE",
    17                 "documentcreateelementdefaultattr", "documentcreateentityreference", "documentcreateentityreferenceknown",
    18                 "documenttypegetentities", "documenttypegetentitieslength", "documenttypegetentitiestype",
    19                 "documenttypegetnotations", "documenttypegetnotationstype", "elementremoveattribute",
    20                 "elementremoveattributenodenomodificationallowederr", "elementremoveattributenodenomodificationallowederrEE",
    21                 "elementremoveattributenomodificationallowederr", "elementremoveattributenomodificationallowederrEE",
    22                 "elementremoveattributerestoredefaultvalue", "elementretrieveallattributes",
    23                 "elementsetattributenodenomodificationallowederr", "elementsetattributenodenomodificationallowederrEE",
    24                 "elementsetattributenomodificationallowederr", "elementsetattributenomodificationallowederrEE",
    25                 "entitygetentityname", "entitygetpublicid", "entitygetpublicidnull", "namednodemapremovenameditem",
    26                 "namednodemapremovenameditemgetvalue", "nodeappendchildnomodificationallowederr", "nodeappendchildnomodificationallowederrEE",
    27                 "nodeentitynodeattributes", "nodeentitynodename", "nodeentitynodetype", "nodeentitynodevalue",
    28                 "nodeentityreferencenodeattributes", "nodeentityreferencenodename", "nodeentityreferencenodetype",
    29                 "nodeentityreferencenodevalue", "nodeentitysetnodevalue", "nodeinsertbeforenomodificationallowederr",
    30                 "nodeinsertbeforenomodificationallowederrEE", "nodenotationnodeattributes", "nodenotationnodename",
    31                 "nodenotationnodetype", "nodenotationnodevalue", "noderemovechildnomodificationallowederr",
    32                 "noderemovechildnomodificationallowederrEE", "nodereplacechildnomodificationallowederr",
    33                 "nodereplacechildnomodificationallowederrEE", "nodesetnodevaluenomodificationallowederr",
    34                 "nodesetnodevaluenomodificationallowederrEE", "nodevalue03","nodevalue07", "nodevalue08",
    35                 "notationgetnotationname", "notationgetpublicid", "notationgetpublicidnull", "notationgetsystemid",
    36                 "notationgetsystemidnull", "processinginstructionsetdatanomodificationallowederr",
    37                 "processinginstructionsetdatanomodificationallowederrEE", "textsplittextnomodificationallowederr",
    38                 "textsplittextnomodificationallowederrEE"];
    40 // we don't pass these, unfortunately
    41 var indexErrTests = ["characterdataindexsizeerrdeletedatacountnegative", "characterdataindexsizeerrreplacedatacountnegative",
    42                      "characterdataindexsizeerrsubstringcountnegative", "hc_characterdataindexsizeerrdeletedatacountnegative",
    43                      "hc_characterdataindexsizeerrreplacedatacountnegative", "hc_characterdataindexsizeerrsubstringcountnegative"];
    45 var attributeModTests = ["hc_attrappendchild1", "hc_attrappendchild3", "hc_attrappendchild5",
    46                          "hc_attrappendchild6", "hc_attrchildnodes2", "hc_attrclonenode1", "hc_attrinsertbefore1",
    47                          "hc_attrinsertbefore2", "hc_attrinsertbefore3", "hc_attrinsertbefore4", "hc_attrinsertbefore6",
    48                          "hc_attrnormalize", "hc_attrreplacechild1", "hc_attrreplacechild2",
    49                          "hc_attrsetvalue2", "hc_elementnormalize2", "hc_elementnotfounderr", "hc_elementremoveattribute", "hc_elementnormalize2",
    50                          "hc_elementnotfounderr", "hc_elementremoveattribute",
    51                          "hc_attrchildnodes1", "hc_attrfirstchild",
    52                          "hc_attrhaschildnodes", "hc_attrlastchild",
    53                          "hc_attrremovechild1", "hc_attrsetvalue1"];
    54 var modTests = ["hc_elementwrongdocumenterr", "hc_namednodemapwrongdocumenterr", "hc_nodeappendchildnewchilddiffdocument", "hc_nodeinsertbeforenewchilddiffdocument",
    55                 "hc_nodereplacechildnewchilddiffdocument", "hc_elementwrongdocumenterr", "hc_namednodemapwrongdocumenterr", "hc_nodeappendchildnewchilddiffdocument",
    56                 "hc_nodeinsertbeforenewchilddiffdocument", "hc_nodereplacechildnewchilddiffdocument", "elementwrongdocumenterr", "namednodemapwrongdocumenterr",
    57                 "nodeappendchildnewchilddiffdocument", "nodeinsertbeforenewchilddiffdocument", "nodereplacechildnewchilddiffdocument"];
    58 // These tests rely on an implementation of document.createEntityReference.
    59 var createEntityRef = ["documentinvalidcharacterexceptioncreateentref",
    60                        "documentinvalidcharacterexceptioncreateentref1",
    61                        "hc_attrgetvalue2", "hc_nodevalue03"];
    62 var createProcessingInstructionHTML = ["documentinvalidcharacterexceptioncreatepi",
    63                                        "documentinvalidcharacterexceptioncreatepi1"];
    64 // These tests expect Node.attributes to exist.
    65 var attributesOnNode = [
    66   "hc_commentgetcomment",
    67   "hc_documentgetdoctype",
    68   "hc_nodeattributenodeattribute",
    69   "hc_nodecommentnodeattributes",
    70   "hc_nodecommentnodeattributes",
    71   "hc_nodedocumentfragmentnodevalue",
    72   "hc_nodedocumentnodeattribute",
    73   "hc_nodetextnodeattribute",
    74   "nodeattributenodeattribute",
    75   "nodecommentnodeattributes",
    76   "nodecommentnodeattributes",
    77   "nodedocumentfragmentnodevalue",
    78   "nodedocumentnodeattribute",
    79   "nodeprocessinginstructionnodeattributes",
    80   "nodetextnodeattribute",
    81   "nodecdatasectionnodeattribute",
    82   "nodedocumenttypenodevalue"
    83 ]
    85 var todoTests = {};
    86 function concat(lst/*...*/) {
    87   var f = [];
    88   if (arguments !== null) {
    89     f = arguments[0];
    90   }
    91   for (var i = 1; i < arguments.length; i++) {
    92     f = f.concat(arguments[i]);
    93   }
    94   return f;
    95 }
    96 var exclusions = concat(dtdTests, indexErrTests, attributeModTests, modTests, createEntityRef, createProcessingInstructionHTML, attributesOnNode);
    97 for (var excludedTestName in exclusions) { todoTests[exclusions[excludedTestName]] = true; }

mercurial