| createElementNS tests from mozilla, attached to webkit bug 16833 |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| HTML tests: |
| PASS createElementNS(, ) |
| PASS createElementNS(null, ) |
| PASS createElementNS(, null) |
| PASS createElementNS(null, null) |
| PASS createElementNS(null, ""); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided is empty. |
| PASS createElementNS("", null) |
| PASS createElementNS("", ""); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided is empty. |
| PASS createElementNS(null, "<div>"); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('<div>') contains the invalid name-start character '<'. |
| PASS createElementNS(null, "0div"); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('0div') contains the invalid name-start character '0'. |
| PASS createElementNS(null, "di v"); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('di v') contains the invalid character ' '. |
| PASS createElementNS(null, "di<v"); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('di<v') contains the invalid character '<'. |
| PASS createElementNS(null, "-div"); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('-div') contains the invalid name-start character '-'. |
| PASS createElementNS(null, ".div"); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('.div') contains the invalid name-start character '.'. |
| PASS createElementNS("http://example.com/", "<div>"); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('<div>') contains the invalid name-start character '<'. |
| PASS createElementNS("http://example.com/", "0div"); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('0div') contains the invalid name-start character '0'. |
| PASS createElementNS("http://example.com/", "di<v"); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('di<v') contains the invalid character '<'. |
| PASS createElementNS("http://example.com/", "-div"); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('-div') contains the invalid name-start character '-'. |
| PASS createElementNS("http://example.com/", ".div"); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('.div') contains the invalid name-start character '.'. |
| PASS createElementNS(null, ":div"); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided (':div') has an empty namespace prefix. |
| PASS createElementNS(null, "div:"); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('div:') has an empty local name. |
| PASS createElementNS("http://example.com/", ":div"); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided (':div') has an empty namespace prefix. |
| PASS createElementNS("http://example.com/", "div:"); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('div:') has an empty local name. |
| PASS createElementNS(null, "d:iv"); threw NamespaceError: Failed to execute 'createElementNS' on 'Document': The namespace URI provided ('') is not valid for the qualified name provided ('d:iv'). |
| PASS createElementNS(null, "a:b:c"); valid XML name, invalid QName; threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('a:b:c') contains multiple colons. |
| PASS createElementNS("http://example.com/", "a:b:c"); valid XML name, invalid QName; threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('a:b:c') contains multiple colons. |
| PASS createElementNS(null, "a::c"); valid XML name, invalid QName; threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('a::c') contains multiple colons. |
| PASS createElementNS("http://example.com/", "a::c"); valid XML name, invalid QName; threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('a::c') contains multiple colons. |
| PASS createElementNS("http://example.com/", "a:0"); valid XML name, not a valid QName; threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('a:0') contains the invalid name-start character '0'. |
| PASS createElementNS("http://example.com/", "0:a"); 0 at start makes it not a valid XML name; threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('0:a') contains the invalid name-start character '0'. |
| PASS createElementNS("http://example.com/", "a:_") |
| FAIL createElementNS("http://example.com/", "a:ெ"); non-ASCII character after colon is CombiningChar, which is NCNameChar but not (Letter | "_") so invalid at start of NCName (but still a valid XML name, hence not INVALID_CHARACTER_ERR); expected NAMESPACE_ERR, threw INVALID_CHARACTER_ERR |
| PASS createElementNS("http://example.com/", "ெ:a"); non-ASCII character after colon is CombiningChar, which is NCNameChar but not (Letter | "_") so invalid at start of NCName (Gecko chooses to throw NAMESPACE_ERR here, but either is valid as this is both an invalid XML name and an invalid QName); threw InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('ெ:a') contains the invalid name-start character 'ெ'. |
| PASS createElementNS("http://example.com/", "a:aெ") |
| PASS createElementNS("http://example.com/", "aெ:a") |
| PASS createElementNS("http://example.com/", "xml:test"); binding xml prefix wrong; threw NamespaceError: Failed to execute 'createElementNS' on 'Document': The namespace URI provided ('http://example.com/') is not valid for the qualified name provided ('xml:test'). |
| PASS createElementNS("http://example.com/", "xmlns:test"); binding xmlns prefix wrong; threw NamespaceError: Failed to execute 'createElementNS' on 'Document': The namespace URI provided ('http://example.com/') is not valid for the qualified name provided ('xmlns:test'). |
| PASS createElementNS("http://www.w3.org/2000/xmlns/", "x:test"); binding namespace namespace to wrong prefix; threw 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 ('x:test'). |
| PASS createElementNS("http://www.w3.org/2000/xmlns/", "xmlns:test") |
| PASS createElementNS("http://www.w3.org/XML/1998/namespace", "xml:test") |
| PASS createElementNS("http://www.w3.org/XML/1998/namespace", "x:test") |
| PASS createElement() |
| PASS createElement(null) |
| PASS createElement(""); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('') is not a valid name. |
| PASS createElement("<div>"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('<div>') is not a valid name. |
| PASS createElement("0div"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('0div') is not a valid name. |
| PASS createElement("di v"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('di v') is not a valid name. |
| PASS createElement("di<v"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('di<v') is not a valid name. |
| PASS createElement("-div"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('-div') is not a valid name. |
| PASS createElement(".div"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('.div') is not a valid name. |
| PASS createElement(":"); valid XML name, invalid QName |
| PASS createElement(":div"); valid XML name, invalid QName |
| PASS createElement("div:"); valid XML name, invalid QName |
| PASS createElement("d:iv") |
| PASS createElement("a:b:c"); valid XML name, invalid QName |
| PASS createElement("a::c"); valid XML name, invalid QName |
| PASS createElement("a::c:"); valid XML name, invalid QName |
| PASS createElement("a:0"); valid XML name, not a valid QName |
| PASS createElement("0:a"); 0 at start makes it not a valid XML name; threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('0:a') is not a valid name. |
| PASS createElement("a:_") |
| PASS createElement("a:ெ"); non-ASCII character after colon is CombiningChar, which is valid in pre-namespace XML |
| PASS createElement("ெ:a"); not a valid start character; threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('ெ:a') is not a valid name. |
| PASS createElement("a:aெ") |
| PASS createElement("aெ:a") |
| PASS createElement("xml:test") |
| PASS createElement("xmlns:test") |
| PASS createElement("x:test") |
| PASS createElement("xmlns:test") |
| PASS createElement("SOAP-ENV:Body") |
| XHTML createElement tests: |
| PASS createElement() |
| PASS createElement(null) |
| PASS createElement(""); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('') is not a valid name. |
| PASS createElement("<div>"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('<div>') is not a valid name. |
| PASS createElement("0div"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('0div') is not a valid name. |
| PASS createElement("di v"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('di v') is not a valid name. |
| PASS createElement("di<v"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('di<v') is not a valid name. |
| PASS createElement("-div"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('-div') is not a valid name. |
| PASS createElement(".div"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('.div') is not a valid name. |
| PASS createElement(":"); valid XML name, invalid QName |
| PASS createElement(":div"); valid XML name, invalid QName |
| PASS createElement("div:"); valid XML name, invalid QName |
| PASS createElement("d:iv") |
| PASS createElement("a:b:c"); valid XML name, invalid QName |
| PASS createElement("a::c"); valid XML name, invalid QName |
| PASS createElement("a::c:"); valid XML name, invalid QName |
| PASS createElement("a:0"); valid XML name, not a valid QName |
| PASS createElement("0:a"); 0 at start makes it not a valid XML name; threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('0:a') is not a valid name. |
| PASS createElement("a:_") |
| PASS createElement("a:ெ"); non-ASCII character after colon is CombiningChar, which is valid in pre-namespace XML |
| PASS createElement("ெ:a"); not a valid start character; threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('ெ:a') is not a valid name. |
| PASS createElement("a:aெ") |
| PASS createElement("aெ:a") |
| PASS createElement("xml:test") |
| PASS createElement("xmlns:test") |
| PASS createElement("x:test") |
| PASS createElement("xmlns:test") |
| PASS createElement("SOAP-ENV:Body") |
| XML createElement tests: |
| PASS createElement() |
| PASS createElement(null) |
| PASS createElement(""); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('') is not a valid name. |
| PASS createElement("<div>"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('<div>') is not a valid name. |
| PASS createElement("0div"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('0div') is not a valid name. |
| PASS createElement("di v"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('di v') is not a valid name. |
| PASS createElement("di<v"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('di<v') is not a valid name. |
| PASS createElement("-div"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('-div') is not a valid name. |
| PASS createElement(".div"); threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('.div') is not a valid name. |
| PASS createElement(":"); valid XML name, invalid QName |
| PASS createElement(":div"); valid XML name, invalid QName |
| PASS createElement("div:"); valid XML name, invalid QName |
| PASS createElement("d:iv") |
| PASS createElement("a:b:c"); valid XML name, invalid QName |
| PASS createElement("a::c"); valid XML name, invalid QName |
| PASS createElement("a::c:"); valid XML name, invalid QName |
| PASS createElement("a:0"); valid XML name, not a valid QName |
| PASS createElement("0:a"); 0 at start makes it not a valid XML name; threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('0:a') is not a valid name. |
| PASS createElement("a:_") |
| PASS createElement("a:ெ"); non-ASCII character after colon is CombiningChar, which is valid in pre-namespace XML |
| PASS createElement("ெ:a"); not a valid start character; threw InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('ெ:a') is not a valid name. |
| PASS createElement("a:aெ") |
| PASS createElement("aெ:a") |
| PASS createElement("xml:test") |
| PASS createElement("xmlns:test") |
| PASS createElement("x:test") |
| PASS createElement("xmlns:test") |
| PASS createElement("SOAP-ENV:Body") |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |