1 Test that calling createElementNS() throws an error when http://www.w3.org/TR/dom/#dom-document-createelementns says it should.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 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')..
7 PASS document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc') did not throw exception.
8 PASS document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc').namespaceURI is "http://www.w3.org/XML/1998/namespace"
9 PASS document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc').nodeName is "xml:abc"
10 PASS document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc').prefix is "xml"
11 PASS document.createElementNS('http://www.w3.org/XML/1998/namespace', 'xml:abc').localName is "abc"
12 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')..
13 PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns') did not throw exception.
14 PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns').namespaceURI is "http://www.w3.org/2000/xmlns/"
15 PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns').nodeName is "xmlns"
16 PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns').prefix is null
17 PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns').localName is "xmlns"
18 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')..
19 PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc', 'http://wwww.example.org') did not throw exception.
20 PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc').namespaceURI is "http://www.w3.org/2000/xmlns/"
21 PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc').nodeName is "xmlns:abc"
22 PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc').prefix is "xmlns"
23 PASS document.createElementNS('http://www.w3.org/2000/xmlns/', 'xmlns:abc').localName is "abc"
24 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')..
25 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')..
26 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')..
27 PASS successfullyParsed is true