Chrome Version: 59 canary
OS: All but iOS
What steps will reproduce the problem?
(1) Open http://w3c-test.org/dom/nodes/Document-createElementNS.html
Note that there are other failing tests in dom/nodes/ due to this issue.
What is the expected result?
No FAILs.
What happens instead?
There are some failures. e.g.
assert_throws: function "function () { doc.createElementNS(namespace, qualifiedName) }" threw object "InvalidCharacterError: Failed to execute 'createElementNS' on 'Document': The qualified name provided ('a:0') contains the invalid name-start character '0'." that is not a DOMException NAMESPACE_ERR: property "code" is equal to 5, expected 14
Please use labels and text to provide additional information.
The test is that what should be thrown by:
document.createElementNS("http://example.com/","a:0")
Blink now throws InvalidCharacterError.
https://dom.spec.whatwg.org/#validate
> 1. If qualifiedName does not match the Name production, then throw an InvalidCharacterError.
> 2. If qualifiedName does not match the QName production, then throw a NamespaceError.
"a:0" matches to "Name" production, so NamespaceError should be thrown.
Implementation is in createQualifiedName() in core/dom/Document.cpp.
Comment 1 by annevank...@gmail.com
, Mar 16 2017