| Test that calling createElementNS() throws an error when http://www.w3.org/TR/dom/#dom-document-createelementns says it should. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| PASS document.createElementNS(null, 'foo:bar') threw exception NamespaceError: Failed to execute 'createElementNS' on 'Document': The namespace URI provided ('') is not valid for the qualified name provided ('foo:bar').. |
| 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: Failed to execute 'createElementNS' on 'Document': The namespace URI provided ('http://www.w3.org/not-XML/1998/namespace') is not valid for the qualified name provided ('xml:abc').. |
| 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: Failed to execute 'createElementNS' on 'Document': The namespace URI provided ('http://www.w3.org/2000/not-xmlns/') is not valid for the qualified name provided ('xmlns').. |
| PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc', 'http://wwww.example.org') 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', 'http://wwww.example.org') threw exception NamespaceError: Failed to execute 'createElementNS' on 'Document': The namespace URI provided ('http://www.w3.org/2000/not-xmlns/') is not valid for the qualified name provided ('xmlns:abc').. |
| PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'badprefix:xmlns') threw exception NamespaceError: Failed to execute 'createElementNS' on 'Document': The namespace URI provided ('http://www.w3.org/2000/xmlns/') is not valid for the qualified name provided ('badprefix:xmlns').. |
| PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'notxmlns') threw exception NamespaceError: Failed to execute 'createElementNS' on 'Document': The namespace URI provided ('http://www.w3.org/2000/xmlns/') is not valid for the qualified name provided ('notxmlns').. |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |