blob: 0f8b7fd4d927e2d33ceb94aa9b033bed3117bf16 [file] [log] [blame]
Test that calling createElementNS() throws an error when the DOM spec says it should.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
FAIL document.createElementNS(null, 'foo:bar') should throw NamespaceError (DOM Exception 14): The operation is not allowed by Namespaces in XML.. Threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
PASS document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc') did not throw exception.
PASS document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc').namespaceURI is "http://www.w3.org/XML/1998/namespace"
PASS document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc').nodeName is "xml:abc"
PASS document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc').prefix is "xml"
PASS document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc').localName is "abc"
PASS document.createElementNS('http://www.w3.org/not-XML/1998/namespace', 'xml:abc') threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns') did not throw exception.
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns').namespaceURI is "http://www.w3.org/2000/xmlns/"
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns').nodeName is "xmlns"
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns').prefix is null
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns').localName is "xmlns"
PASS document.createElementNS('http://www.w3.org/2000/not-xmlns/', 'xmlns') threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc') did not throw exception.
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc').namespaceURI is "http://www.w3.org/2000/xmlns/"
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc').nodeName is "xmlns:abc"
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc').prefix is "xmlns"
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc').localName is "abc"
PASS document.createElementNS('http://www.w3.org/2000/not-xmlns/', 'xmlns:abc') threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'badprefix:xmlns') threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'notxmlns') threw exception NamespaceError: The operation is not allowed by Namespaces in XML..
PASS successfullyParsed is true
TEST COMPLETE