blob: ce53f9ff90e0b2cf4c4da3b436a2934bc6662cbc [file] [log] [blame]
Test creation of each type of Node and check intial values
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Attribute creation using createElement on an HTML doc:
PASS attr.nodeName is 'foo'
PASS attr.name is 'foo'
FAIL attr.localName should be null (of type object). Was foo (of type string).
PASS attr.namespaceURI is null
PASS attr.prefix is null
PASS attr.nodeValue is ''
PASS attr.value is ''
Attribute creation using createElementNS on an HTML doc:
PASS attr.nodeName is 'example:foo'
PASS attr.name is 'example:foo'
PASS attr.localName is 'foo'
PASS attr.namespaceURI is 'http://www.example.com'
PASS attr.prefix is 'example'
PASS attr.nodeValue is ''
PASS attr.value is ''
Attribute creation using createElement on an XHTML doc:
PASS attr.nodeName is 'foo'
PASS attr.name is 'foo'
FAIL attr.localName should be null (of type object). Was foo (of type string).
PASS attr.namespaceURI is null
PASS attr.prefix is null
PASS attr.nodeValue is ''
PASS attr.value is ''
Attribute creation using createElementNS on an XHTML doc:
PASS attr.nodeName is 'example:foo'
PASS attr.name is 'example:foo'
PASS attr.localName is 'foo'
PASS attr.namespaceURI is 'http://www.example.com'
PASS attr.prefix is 'example'
PASS attr.nodeValue is ''
PASS attr.value is ''
PASS comment.nodeName is '#comment'
PASS comment.localName is undefined.
PASS comment.namespaceURI is undefined.
PASS comment.prefix is undefined.
PASS comment.nodeValue is 'foo'
PASS comment.data is 'foo'
PASS document.createCDATASection('foo') threw exception NotSupportedError: The operation is not supported..
PASS cdata.nodeName is '#cdata-section'
PASS cdata.localName is undefined.
PASS cdata.namespaceURI is undefined.
PASS cdata.prefix is undefined.
PASS cdata.nodeValue is 'foo'
PASS cdata.data is 'foo'
PASS fragment.nodeName is '#document-fragment'
PASS fragment.localName is undefined.
PASS fragment.namespaceURI is undefined.
PASS fragment.prefix is undefined.
PASS fragment.nodeValue is null
PASS doc.nodeName is '#document'
PASS doc.localName is undefined.
PASS doc.namespaceURI is undefined.
PASS doc.prefix is undefined.
PASS doc.nodeValue is null
PASS doctype.nodeName is 'svg'
PASS doctype.name is 'svg'
PASS doctype.localName is undefined.
PASS doctype.namespaceURI is undefined.
PASS doctype.prefix is undefined.
PASS doctype.nodeValue is null
Element creation using createElement on an HTML doc:
PASS element.nodeName is 'PRE'
FAIL element.localName should be null (of type object). Was pre (of type string).
FAIL element.namespaceURI should be null (of type object). Was http://www.w3.org/1999/xhtml (of type string).
PASS element.prefix is null
PASS element.nodeValue is null
PASS element.attributes.toString() is '[object NamedNodeMap]'
Prefixed element creation using createElementNS on an HTML doc:
PASS element.nodeName is 'HTML:PRE'
PASS element.localName is 'pre'
PASS element.namespaceURI is 'http://www.w3.org/1999/xhtml'
PASS element.prefix is 'html'
PASS element.nodeValue is null
PASS element.attributes.toString() is '[object NamedNodeMap]'
SVG Element creation using createElementNS on an HTML doc:
PASS element.nodeName is 'svg'
PASS element.localName is 'svg'
PASS element.namespaceURI is 'http://www.w3.org/2000/svg'
PASS element.prefix is null
PASS element.nodeValue is null
PASS element.attributes.toString() is '[object NamedNodeMap]'
Unknown Element creation using createElementNS on an HTML doc:
PASS element.nodeName is 'foo:svg'
PASS element.localName is 'svg'
PASS element.namespaceURI is 'http://www.webkit.org'
PASS element.prefix is 'foo'
PASS element.nodeValue is null
PASS element.attributes.toString() is '[object NamedNodeMap]'
Element creation using createElementNS on an HTML doc:
FAIL element.nodeName should be pre. Was PRE.
PASS element.localName is 'pre'
PASS element.namespaceURI is 'http://www.w3.org/1999/xhtml'
PASS element.prefix is null
PASS element.nodeValue is null
PASS element.attributes.toString() is '[object NamedNodeMap]'
Element creation using createElement on an XHTML doc:
PASS element.nodeName is 'pre'
FAIL element.localName should be null (of type object). Was pre (of type string).
FAIL element.namespaceURI should be null (of type object). Was http://www.w3.org/1999/xhtml (of type string).
PASS element.prefix is null
PASS element.nodeValue is null
PASS element.attributes.toString() is '[object NamedNodeMap]'
Element creation using createElementNS on an XHTML doc:
PASS element.nodeName is 'html:pre'
PASS element.localName is 'pre'
PASS element.namespaceURI is 'http://www.w3.org/1999/xhtml'
PASS element.prefix is 'html'
PASS element.nodeValue is null
PASS element.attributes.toString() is '[object NamedNodeMap]'
PASS processingInstruction.nodeName is 'xml-stylesheet'
PASS processingInstruction.localName is undefined.
PASS processingInstruction.namespaceURI is undefined.
PASS processingInstruction.prefix is undefined.
PASS processingInstruction.nodeName is 'xml-stylesheet'
PASS processingInstruction.localName is undefined.
PASS processingInstruction.namespaceURI is undefined.
PASS processingInstruction.prefix is undefined.
PASS processingInstruction.nodeValue is 'type="text/xsl" href="missing.xsl"'
PASS processingInstruction.target is 'xml-stylesheet'
PASS processingInstruction.data is 'type="text/xsl" href="missing.xsl"'
PASS text.nodeName is '#text'
PASS text.localName is undefined.
PASS text.namespaceURI is undefined.
PASS text.prefix is undefined.
PASS text.nodeValue is 'foo'
PASS text.data is 'foo'
PASS successfullyParsed is true
TEST COMPLETE