Home | History | Annotate | Download | only in Node
      1 Test creation of each type of Node and check intial values
      2 
      3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
      4 
      5 
      6 Attribute creation using createElement on an HTML doc:
      7 PASS attr.nodeName is 'foo'
      8 PASS attr.name is 'foo'
      9 FAIL attr.localName should be null (of type object). Was foo (of type string).
     10 PASS attr.namespaceURI is null
     11 PASS attr.prefix is null
     12 PASS attr.nodeValue is ''
     13 PASS attr.value is ''
     14 PASS attr.attributes is null
     15 Attribute creation using createElementNS on an HTML doc:
     16 PASS attr.nodeName is 'example:foo'
     17 PASS attr.name is 'example:foo'
     18 PASS attr.localName is 'foo'
     19 PASS attr.namespaceURI is 'http://www.example.com'
     20 PASS attr.prefix is 'example'
     21 PASS attr.nodeValue is ''
     22 PASS attr.value is ''
     23 PASS attr.attributes is null
     24 Attribute creation using createElement on an XHTML doc:
     25 PASS attr.nodeName is 'foo'
     26 PASS attr.name is 'foo'
     27 FAIL attr.localName should be null (of type object). Was foo (of type string).
     28 PASS attr.namespaceURI is null
     29 PASS attr.prefix is null
     30 PASS attr.nodeValue is ''
     31 PASS attr.value is ''
     32 PASS attr.attributes is null
     33 Attribute creation using createElementNS on an XHTML doc:
     34 PASS attr.nodeName is 'example:foo'
     35 PASS attr.name is 'example:foo'
     36 PASS attr.localName is 'foo'
     37 PASS attr.namespaceURI is 'http://www.example.com'
     38 PASS attr.prefix is 'example'
     39 PASS attr.nodeValue is ''
     40 PASS attr.value is ''
     41 PASS attr.attributes is null
     42 PASS comment.nodeName is '#comment'
     43 PASS comment.localName is null
     44 PASS comment.namespaceURI is null
     45 PASS comment.prefix is null
     46 PASS comment.nodeValue is 'foo'
     47 PASS comment.data is 'foo'
     48 PASS comment.attributes is null
     49 PASS document.createCDATASection('foo') threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
     50 PASS cdata.nodeName is '#cdata-section'
     51 PASS cdata.localName is null
     52 PASS cdata.namespaceURI is null
     53 PASS cdata.prefix is null
     54 PASS cdata.nodeValue is 'foo'
     55 PASS cdata.data is 'foo'
     56 PASS cdata.attributes is null
     57 PASS fragment.nodeName is '#document-fragment'
     58 PASS fragment.localName is null
     59 PASS fragment.namespaceURI is null
     60 PASS fragment.prefix is null
     61 PASS fragment.nodeValue is null
     62 PASS fragment.attributes is null
     63 PASS doc.nodeName is '#document'
     64 PASS doc.localName is null
     65 FAIL doc.namespaceURI should be http://www.w3.org/1999/xhtml (of type string). Was null (of type object).
     66 PASS doc.prefix is null
     67 PASS doc.nodeValue is null
     68 PASS doc.attributes is null
     69 PASS doctype.nodeName is 'svg'
     70 PASS doctype.name is 'svg'
     71 PASS doctype.localName is null
     72 PASS doctype.namespaceURI is null
     73 PASS doctype.prefix is null
     74 PASS doctype.nodeValue is null
     75 PASS doctype.attributes is null
     76 Element creation using createElement on an HTML doc:
     77 PASS element.nodeName is 'PRE'
     78 FAIL element.localName should be null (of type object). Was pre (of type string).
     79 FAIL element.namespaceURI should be null (of type object). Was http://www.w3.org/1999/xhtml (of type string).
     80 PASS element.prefix is null
     81 PASS element.nodeValue is null
     82 PASS element.attributes.toString() is '[object NamedNodeMap]'
     83 Prefixed element creation using createElementNS on an HTML doc:
     84 PASS element.nodeName is 'html:pre'
     85 PASS element.localName is 'pre'
     86 PASS element.namespaceURI is 'http://www.w3.org/1999/xhtml'
     87 PASS element.prefix is 'html'
     88 PASS element.nodeValue is null
     89 PASS element.attributes.toString() is '[object NamedNodeMap]'
     90 SVG Element creation using createElementNS on an HTML doc:
     91 PASS element.nodeName is 'svg'
     92 PASS element.localName is 'svg'
     93 PASS element.namespaceURI is 'http://www.w3.org/2000/svg'
     94 PASS element.prefix is null
     95 PASS element.nodeValue is null
     96 PASS element.attributes.toString() is '[object NamedNodeMap]'
     97 Unknown Element creation using createElementNS on an HTML doc:
     98 PASS element.nodeName is 'foo:svg'
     99 PASS element.localName is 'svg'
    100 PASS element.namespaceURI is 'http://www.webkit.org'
    101 PASS element.prefix is 'foo'
    102 PASS element.nodeValue is null
    103 PASS element.attributes.toString() is '[object NamedNodeMap]'
    104 Element creation using createElementNS on an HTML doc:
    105 FAIL element.nodeName should be pre. Was PRE.
    106 PASS element.localName is 'pre'
    107 PASS element.namespaceURI is 'http://www.w3.org/1999/xhtml'
    108 PASS element.prefix is null
    109 PASS element.nodeValue is null
    110 PASS element.attributes.toString() is '[object NamedNodeMap]'
    111 Element creation using createElement on an XHTML doc:
    112 PASS element.nodeName is 'pre'
    113 FAIL element.localName should be null (of type object). Was pre (of type string).
    114 FAIL element.namespaceURI should be null (of type object). Was http://www.w3.org/1999/xhtml (of type string).
    115 PASS element.prefix is null
    116 PASS element.nodeValue is null
    117 PASS element.attributes.toString() is '[object NamedNodeMap]'
    118 Element creation using createElementNS on an XHTML doc:
    119 PASS element.nodeName is 'html:pre'
    120 PASS element.localName is 'pre'
    121 PASS element.namespaceURI is 'http://www.w3.org/1999/xhtml'
    122 PASS element.prefix is 'html'
    123 PASS element.nodeValue is null
    124 PASS element.attributes.toString() is '[object NamedNodeMap]'
    125 PASS document.createEntityReference('gt') threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
    126 PASS entityReference.nodeName is 'gt'
    127 PASS entityReference.localName is null
    128 PASS entityReference.namespaceURI is null
    129 PASS entityReference.prefix is null
    130 PASS entityReference.nodeValue is null
    131 PASS entityReference.attributes is null
    132 PASS document.createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="missing.xsl"') threw exception Error: NOT_SUPPORTED_ERR: DOM Exception 9.
    133 PASS processingInstruction.nodeName is 'xml-stylesheet'
    134 PASS processingInstruction.localName is null
    135 PASS processingInstruction.namespaceURI is null
    136 PASS processingInstruction.prefix is null
    137 PASS processingInstruction.nodeValue is 'type="text/xsl" href="missing.xsl"'
    138 PASS processingInstruction.attributes is null
    139 PASS processingInstruction.target is 'xml-stylesheet'
    140 PASS processingInstruction.data is 'type="text/xsl" href="missing.xsl"'
    141 PASS text.nodeName is '#text'
    142 PASS text.localName is null
    143 PASS text.namespaceURI is null
    144 PASS text.prefix is null
    145 PASS text.nodeValue is 'foo'
    146 PASS text.data is 'foo'
    147 PASS text.attributes is null
    148 PASS successfullyParsed is true
    149 
    150 TEST COMPLETE
    151 
    152