| Index: LayoutTests/fast/dom/Document/createAttributeNS-namespace-err-expected.txt
|
| diff --git a/LayoutTests/fast/dom/Document/createAttributeNS-namespace-err-expected.txt b/LayoutTests/fast/dom/Document/createAttributeNS-namespace-err-expected.txt
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..06fbf9a411009d010131c5d79ff54e917c23c091
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/dom/Document/createAttributeNS-namespace-err-expected.txt
|
| @@ -0,0 +1,53 @@
|
| +createAttirbuteNS tests adapted from createElementNS tests attached to webkit bug 16833
|
| +
|
| +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
|
| +
|
| +
|
| +PASS document.createAttributeNS().toString() is "[object Attr]"
|
| +PASS document.createAttributeNS("http://www.example.com").toString() is "[object Attr]"
|
| +PASS createAttributeNS(undefined, undefined)
|
| +PASS createAttributeNS(null, undefined)
|
| +PASS createAttributeNS(undefined, null); threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided is empty.
|
| +PASS createAttributeNS(null, null); threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided is empty.
|
| +PASS createAttributeNS(null, ""); threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided is empty.
|
| +PASS createAttributeNS("", null); threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided is empty.
|
| +PASS createAttributeNS("", ""); threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided is empty.
|
| +PASS createAttributeNS(null, "<div>"); threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('<div>') contains the invalid name-start character '<'.
|
| +PASS createAttributeNS(null, "0div"); threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('0div') contains the invalid name-start character '0'.
|
| +PASS createAttributeNS(null, "di v"); threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('di v') contains the invalid character ' '.
|
| +PASS createAttributeNS(null, "di<v"); threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('di<v') contains the invalid character '<'.
|
| +PASS createAttributeNS(null, "-div"); threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('-div') contains the invalid name-start character '-'.
|
| +PASS createAttributeNS(null, ".div"); threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('.div') contains the invalid name-start character '.'.
|
| +PASS createAttributeNS("http://example.com/", "<div>"); threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('<div>') contains the invalid name-start character '<'.
|
| +PASS createAttributeNS("http://example.com/", "0div"); threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('0div') contains the invalid name-start character '0'.
|
| +PASS createAttributeNS("http://example.com/", "di<v"); threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('di<v') contains the invalid character '<'.
|
| +PASS createAttributeNS("http://example.com/", "-div"); threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('-div') contains the invalid name-start character '-'.
|
| +PASS createAttributeNS("http://example.com/", ".div"); threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('.div') contains the invalid name-start character '.'.
|
| +PASS createAttributeNS(null, ":div"); threw NamespaceError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided (':div') has an empty namespace prefix.
|
| +PASS createAttributeNS(null, "div:"); threw NamespaceError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('div:') has an empty local name.
|
| +PASS createAttributeNS("http://example.com/", ":div"); threw NamespaceError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided (':div') has an empty namespace prefix.
|
| +PASS createAttributeNS("http://example.com/", "div:"); threw NamespaceError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('div:') has an empty local name.
|
| +PASS createAttributeNS(null, "d:iv"); threw NamespaceError: Failed to execute 'createAttributeNS' on 'Document': The namespace URI provided ('') is not valid for the qualified name provided ('d:iv').
|
| +PASS createAttributeNS(null, "a:b:c"); valid XML name, invalid QName; threw NamespaceError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('a:b:c') contains multiple colons.
|
| +PASS createAttributeNS("http://example.com/", "a:b:c"); valid XML name, invalid QName; threw NamespaceError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('a:b:c') contains multiple colons.
|
| +PASS createAttributeNS(null, "a::c"); valid XML name, invalid QName; threw NamespaceError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('a::c') contains multiple colons.
|
| +PASS createAttributeNS("http://example.com/", "a::c"); valid XML name, invalid QName; threw NamespaceError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('a::c') contains multiple colons.
|
| +PASS createAttributeNS("http://example.com/", "a:0"); valid XML name, not a valid QName; threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('a:0') contains the invalid name-start character '0'.
|
| +PASS createAttributeNS("http://example.com/", "0:a"); 0 at start makes it not a valid XML name; threw InvalidCharacterError: Failed to execute 'createAttributeNS' on 'Document': The qualified name provided ('0:a') contains the invalid name-start character '0'.
|
| +PASS createAttributeNS("http://example.com/", "a:_")
|
| +FAIL createAttributeNS("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 createAttributeNS("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 'createAttributeNS' on 'Document': The qualified name provided ('ெ:a') contains the invalid name-start character 'ெ'.
|
| +PASS createAttributeNS("http://example.com/", "a:aெ")
|
| +PASS createAttributeNS("http://example.com/", "aெ:a")
|
| +PASS createAttributeNS("http://example.com/", "xml:test"); binding xml prefix wrong; threw NamespaceError: Failed to execute 'createAttributeNS' on 'Document': The namespace URI provided ('http://example.com/') is not valid for the qualified name provided ('xml:test').
|
| +PASS createAttributeNS("http://example.com/", "xmlns:test"); binding xmlns prefix wrong; threw NamespaceError: Failed to execute 'createAttributeNS' on 'Document': The namespace URI provided ('http://example.com/') is not valid for the qualified name provided ('xmlns:test').
|
| +PASS createAttributeNS("http://www.w3.org/2000/xmlns/", "x:test"); binding namespace namespace to wrong prefix; threw NamespaceError: Failed to execute 'createAttributeNS' on 'Document': The namespace URI provided ('http://www.w3.org/2000/xmlns/') is not valid for the qualified name provided ('x:test').
|
| +PASS createAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:test")
|
| +PASS createAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:test")
|
| +PASS createAttributeNS("http://www.w3.org/XML/1998/namespace", "x:test")
|
| +PASS createAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns")
|
| +PASS createAttributeNS("http://example.com/", "xmlns"); threw NamespaceError: Failed to execute 'createAttributeNS' on 'Document': The namespace URI provided ('http://example.com/') is not valid for the qualified name provided ('xmlns').
|
| +PASS successfullyParsed is true
|
| +
|
| +TEST COMPLETE
|
| +
|
|
|