| createElementNS tests from mozilla, attached to webkit bug 16833 |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| PASS document.createElementNS() threw exception TypeError: Not enough arguments. |
| PASS document.createElementNS("http://www.example.com") threw exception TypeError: Not enough arguments. |
| HTML tests: |
| PASS createElementNS(, ) |
| PASS createElementNS(null, ) |
| PASS createElementNS(, null) |
| PASS createElementNS(null, null) |
| PASS createElementNS(null, ""); threw INVALID_CHARACTER_ERR |
| PASS createElementNS("", null) |
| PASS createElementNS("", ""); threw INVALID_CHARACTER_ERR |
| PASS createElementNS(null, "<div>"); threw INVALID_CHARACTER_ERR |
| PASS createElementNS(null, "0div"); threw INVALID_CHARACTER_ERR |
| PASS createElementNS(null, "di v"); threw INVALID_CHARACTER_ERR |
| PASS createElementNS(null, "di<v"); threw INVALID_CHARACTER_ERR |
| PASS createElementNS(null, "-div"); threw INVALID_CHARACTER_ERR |
| PASS createElementNS(null, ".div"); threw INVALID_CHARACTER_ERR |
| PASS createElementNS("http://example.com/", "<div>"); threw INVALID_CHARACTER_ERR |
| PASS createElementNS("http://example.com/", "0div"); threw INVALID_CHARACTER_ERR |
| PASS createElementNS("http://example.com/", "di<v"); threw INVALID_CHARACTER_ERR |
| PASS createElementNS("http://example.com/", "-div"); threw INVALID_CHARACTER_ERR |
| PASS createElementNS("http://example.com/", ".div"); threw INVALID_CHARACTER_ERR |
| PASS createElementNS(null, ":div"); threw INVALID_CHARACTER_ERR |
| PASS createElementNS(null, "div:"); threw INVALID_CHARACTER_ERR |
| PASS createElementNS("http://example.com/", ":div"); threw INVALID_CHARACTER_ERR |
| PASS createElementNS("http://example.com/", "div:"); threw INVALID_CHARACTER_ERR |
| PASS createElementNS(null, "d:iv"); threw NAMESPACE_ERR |
| PASS createElementNS(null, "a:b:c"); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR |
| PASS createElementNS("http://example.com/", "a:b:c"); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR |
| PASS createElementNS(null, "a::c"); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR |
| PASS createElementNS("http://example.com/", "a::c"); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR |
| PASS createElementNS("http://example.com/", "a:0"); valid XML name, not a valid QName; threw INVALID_CHARACTER_ERR |
| PASS createElementNS("http://example.com/", "0:a"); 0 at start makes it not a valid XML name; threw INVALID_CHARACTER_ERR |
| 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 INVALID_CHARACTER_ERR |
| 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 NAMESPACE_ERR |
| PASS createElementNS("http://example.com/", "xmlns:test"); binding xmlns prefix wrong; threw NAMESPACE_ERR |
| PASS createElementNS("http://www.w3.org/2000/xmlns/", "x:test"); binding namespace namespace to wrong prefix; threw NAMESPACE_ERR |
| 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 INVALID_CHARACTER_ERR |
| PASS createElement("<div>"); threw INVALID_CHARACTER_ERR |
| PASS createElement("0div"); threw INVALID_CHARACTER_ERR |
| PASS createElement("di v"); threw INVALID_CHARACTER_ERR |
| PASS createElement("di<v"); threw INVALID_CHARACTER_ERR |
| PASS createElement("-div"); threw INVALID_CHARACTER_ERR |
| PASS createElement(".div"); threw INVALID_CHARACTER_ERR |
| 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 INVALID_CHARACTER_ERR |
| 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 INVALID_CHARACTER_ERR |
| 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 INVALID_CHARACTER_ERR |
| PASS createElement("<div>"); threw INVALID_CHARACTER_ERR |
| PASS createElement("0div"); threw INVALID_CHARACTER_ERR |
| PASS createElement("di v"); threw INVALID_CHARACTER_ERR |
| PASS createElement("di<v"); threw INVALID_CHARACTER_ERR |
| PASS createElement("-div"); threw INVALID_CHARACTER_ERR |
| PASS createElement(".div"); threw INVALID_CHARACTER_ERR |
| 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 INVALID_CHARACTER_ERR |
| 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 INVALID_CHARACTER_ERR |
| 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 INVALID_CHARACTER_ERR |
| PASS createElement("<div>"); threw INVALID_CHARACTER_ERR |
| PASS createElement("0div"); threw INVALID_CHARACTER_ERR |
| PASS createElement("di v"); threw INVALID_CHARACTER_ERR |
| PASS createElement("di<v"); threw INVALID_CHARACTER_ERR |
| PASS createElement("-div"); threw INVALID_CHARACTER_ERR |
| PASS createElement(".div"); threw INVALID_CHARACTER_ERR |
| 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 INVALID_CHARACTER_ERR |
| 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 INVALID_CHARACTER_ERR |
| 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 |
| |