Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
createElementNS() should now throw only InvalidCharacterError, not Na…
Browse files Browse the repository at this point in the history
…mespaceError

https://bugs.webkit.org/show_bug.cgi?id=171052

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Re-sync web-platform-tests/dom from upstream to gain test coverage.

* web-platform-tests/dom/collections/HTMLCollection-as-proto-length-get-throws.html:
* web-platform-tests/dom/collections/HTMLCollection-empty-name.html:
* web-platform-tests/dom/collections/HTMLCollection-supported-property-indices.html:
* web-platform-tests/dom/collections/HTMLCollection-supported-property-names.html:
* web-platform-tests/dom/collections/domstringmap-supported-property-names.html:
* web-platform-tests/dom/collections/namednodemap-supported-property-names.html:
* web-platform-tests/dom/events/AddEventListenerOptions-once.html:
* web-platform-tests/dom/events/AddEventListenerOptions-passive.html:
* web-platform-tests/dom/events/CustomEvent.html:
* web-platform-tests/dom/events/Event-cancelBubble.html:
* web-platform-tests/dom/events/Event-constants.html:
* web-platform-tests/dom/events/Event-constructors.html:
* web-platform-tests/dom/events/Event-defaultPrevented-after-dispatch.html:
* web-platform-tests/dom/events/Event-defaultPrevented.html:
* web-platform-tests/dom/events/Event-dispatch-bubble-canceled.html:
* web-platform-tests/dom/events/Event-dispatch-bubbles-false.html:
* web-platform-tests/dom/events/Event-dispatch-bubbles-true.html:
* web-platform-tests/dom/events/Event-dispatch-click.html:
* web-platform-tests/dom/events/Event-dispatch-detached-click.html:
* web-platform-tests/dom/events/Event-dispatch-handlers-changed.html:
* web-platform-tests/dom/events/Event-dispatch-multiple-cancelBubble.html:
* web-platform-tests/dom/events/Event-dispatch-multiple-stopPropagation.html:
* web-platform-tests/dom/events/Event-dispatch-omitted-capture.html:
* web-platform-tests/dom/events/Event-dispatch-order.html:
* web-platform-tests/dom/events/Event-dispatch-other-document.html:
* web-platform-tests/dom/events/Event-dispatch-propagation-stopped.html:
* web-platform-tests/dom/events/Event-dispatch-redispatch.html:
* web-platform-tests/dom/events/Event-dispatch-reenter.html:
* web-platform-tests/dom/events/Event-dispatch-target-moved.html:
* web-platform-tests/dom/events/Event-dispatch-target-removed.html:
* web-platform-tests/dom/events/Event-dispatch-throwing.html:
* web-platform-tests/dom/events/Event-init-while-dispatching.html:
* web-platform-tests/dom/events/Event-initEvent.html:
* web-platform-tests/dom/events/Event-propagation.html:
* web-platform-tests/dom/events/Event-subclasses-constructors.html:
* web-platform-tests/dom/events/Event-type-empty.html:
* web-platform-tests/dom/events/Event-type.html:
* web-platform-tests/dom/events/EventListener-handleEvent.html:
* web-platform-tests/dom/events/EventListener-incumbent-global-1.sub.html:
* web-platform-tests/dom/events/EventListener-incumbent-global-2.sub.html:
* web-platform-tests/dom/events/EventListener-invoke-legacy.html:
* web-platform-tests/dom/events/EventListenerOptions-capture.html:
* web-platform-tests/dom/events/EventTarget-addEventListener.html:
* web-platform-tests/dom/events/EventTarget-dispatchEvent-returnvalue.html:
* web-platform-tests/dom/events/EventTarget-dispatchEvent.html:
* web-platform-tests/dom/events/EventTarget-removeEventListener.html:
* web-platform-tests/dom/historical.html:
* web-platform-tests/dom/interface-objects.html:
* web-platform-tests/dom/interfaces.html:
* web-platform-tests/dom/lists/DOMTokenList-Iterable.html:
* web-platform-tests/dom/lists/DOMTokenList-coverage-for-attributes.html:
* web-platform-tests/dom/lists/DOMTokenList-iteration.html:
* web-platform-tests/dom/lists/DOMTokenList-stringifier.html:
* web-platform-tests/dom/lists/DOMTokenList-value.html:
* web-platform-tests/dom/nodes/CharacterData-appendChild.html:
* web-platform-tests/dom/nodes/CharacterData-appendData.html:
* web-platform-tests/dom/nodes/CharacterData-data.html:
* web-platform-tests/dom/nodes/CharacterData-deleteData.html:
* web-platform-tests/dom/nodes/CharacterData-insertData.html:
* web-platform-tests/dom/nodes/CharacterData-remove.html:
* web-platform-tests/dom/nodes/CharacterData-replaceData.html:
* web-platform-tests/dom/nodes/CharacterData-substringData.html:
* web-platform-tests/dom/nodes/CharacterData-surrogates.html:
* web-platform-tests/dom/nodes/ChildNode-after.html:
* web-platform-tests/dom/nodes/ChildNode-before.html:
* web-platform-tests/dom/nodes/ChildNode-replaceWith.html:
* web-platform-tests/dom/nodes/Comment-constructor.html:
* web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt:
* web-platform-tests/dom/nodes/DOMImplementation-createDocument.html:
* web-platform-tests/dom/nodes/DOMImplementation-createDocumentType-expected.txt:
* web-platform-tests/dom/nodes/DOMImplementation-createDocumentType.html:
* web-platform-tests/dom/nodes/DOMImplementation-createHTMLDocument.html:
* web-platform-tests/dom/nodes/DOMImplementation-hasFeature.html:
* web-platform-tests/dom/nodes/Document-URL.sub.html:
* web-platform-tests/dom/nodes/Document-adoptNode.html:
* web-platform-tests/dom/nodes/Document-characterSet-normalization.html:
* web-platform-tests/dom/nodes/Document-constructor.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_bmp.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_css.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_datauri_01.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_datauri_02.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_gif.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_html.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_javascripturi.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_jpg.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_01.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_mimeheader_02.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_png.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_txt.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_xml.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/createDocument.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/createHTMLDocument.html:
* web-platform-tests/dom/nodes/Document-contentType/contentType/xhr_responseType_document.html:
* web-platform-tests/dom/nodes/Document-createAttribute.html:
* web-platform-tests/dom/nodes/Document-createComment.html:
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/w3c-import.log:
* web-platform-tests/dom/nodes/Document-createElement-namespace.html:
* web-platform-tests/dom/nodes/Document-createElement.html:
* web-platform-tests/dom/nodes/Document-createElementNS-expected.txt:
* web-platform-tests/dom/nodes/Document-createElementNS.html:
* web-platform-tests/dom/nodes/Document-createElementNS.js:
* web-platform-tests/dom/nodes/Document-createEvent.html:
* web-platform-tests/dom/nodes/Document-createProcessingInstruction-xhtml.xhtml:
* web-platform-tests/dom/nodes/Document-createProcessingInstruction.html:
* web-platform-tests/dom/nodes/Document-createTextNode.html:
* web-platform-tests/dom/nodes/Document-createTreeWalker.html:
* web-platform-tests/dom/nodes/Document-doctype.html:
* web-platform-tests/dom/nodes/Document-getElementById.html:
* web-platform-tests/dom/nodes/Document-getElementsByTagName-xhtml.xhtml:
* web-platform-tests/dom/nodes/Document-getElementsByTagName.html:
* web-platform-tests/dom/nodes/Document-getElementsByTagNameNS.html:
* web-platform-tests/dom/nodes/Document-implementation.html:
* web-platform-tests/dom/nodes/Document-importNode.html:
* web-platform-tests/dom/nodes/DocumentType-literal-xhtml.xhtml:
* web-platform-tests/dom/nodes/DocumentType-literal.html:
* web-platform-tests/dom/nodes/DocumentType-remove.html:
* web-platform-tests/dom/nodes/Element-childElement-null-xhtml.xhtml:
* web-platform-tests/dom/nodes/Element-childElement-null.html:
* web-platform-tests/dom/nodes/Element-childElementCount-dynamic-add-xhtml.xhtml:
* web-platform-tests/dom/nodes/Element-childElementCount-dynamic-add.html:
* web-platform-tests/dom/nodes/Element-childElementCount-dynamic-remove-xhtml.xhtml:
* web-platform-tests/dom/nodes/Element-childElementCount-dynamic-remove.html:
* web-platform-tests/dom/nodes/Element-childElementCount-nochild-xhtml.xhtml:
* web-platform-tests/dom/nodes/Element-childElementCount-nochild.html:
* web-platform-tests/dom/nodes/Element-childElementCount-xhtml.xhtml:
* web-platform-tests/dom/nodes/Element-childElementCount.html:
* web-platform-tests/dom/nodes/Element-children.html:
* web-platform-tests/dom/nodes/Element-classlist.html:
* web-platform-tests/dom/nodes/Element-closest.html:
* web-platform-tests/dom/nodes/Element-firstElementChild-entity-xhtml.xhtml:
* web-platform-tests/dom/nodes/Element-firstElementChild-namespace-xhtml.xhtml:
* web-platform-tests/dom/nodes/Element-firstElementChild-namespace.html:
* web-platform-tests/dom/nodes/Element-firstElementChild-xhtml.xhtml:
* web-platform-tests/dom/nodes/Element-firstElementChild.html:
* web-platform-tests/dom/nodes/Element-getElementsByClassName.html:
* web-platform-tests/dom/nodes/Element-getElementsByTagName-change-document-HTMLNess.html:
* web-platform-tests/dom/nodes/Element-getElementsByTagName.html:
* web-platform-tests/dom/nodes/Element-getElementsByTagNameNS.html:
* web-platform-tests/dom/nodes/Element-hasAttributes.html:
* web-platform-tests/dom/nodes/Element-insertAdjacentElement.html:
* web-platform-tests/dom/nodes/Element-insertAdjacentText.html:
* web-platform-tests/dom/nodes/Element-lastElementChild-xhtml.xhtml:
* web-platform-tests/dom/nodes/Element-lastElementChild.html:
* web-platform-tests/dom/nodes/Element-matches.html:
* web-platform-tests/dom/nodes/Element-nextElementSibling-xhtml.xhtml:
* web-platform-tests/dom/nodes/Element-nextElementSibling.html:
* web-platform-tests/dom/nodes/Element-previousElementSibling-xhtml.xhtml:
* web-platform-tests/dom/nodes/Element-previousElementSibling.html:
* web-platform-tests/dom/nodes/Element-remove.html:
* web-platform-tests/dom/nodes/Element-removeAttributeNS.html:
* web-platform-tests/dom/nodes/Element-siblingElement-null-xhtml.xhtml:
* web-platform-tests/dom/nodes/Element-siblingElement-null.html:
* web-platform-tests/dom/nodes/Element-tagName.html:
* web-platform-tests/dom/nodes/Element-webkitMatchesSelector.html:
* web-platform-tests/dom/nodes/MutationObserver-attributes.html:
* web-platform-tests/dom/nodes/MutationObserver-characterData.html:
* web-platform-tests/dom/nodes/MutationObserver-childList.html:
* web-platform-tests/dom/nodes/MutationObserver-disconnect.html:
* web-platform-tests/dom/nodes/MutationObserver-document.html:
* web-platform-tests/dom/nodes/MutationObserver-inner-outer.html:
* web-platform-tests/dom/nodes/MutationObserver-takeRecords.html:
* web-platform-tests/dom/nodes/Node-appendChild.html:
* web-platform-tests/dom/nodes/Node-baseURI.html:
* web-platform-tests/dom/nodes/Node-childNodes.html:
* web-platform-tests/dom/nodes/Node-cloneNode.html:
* web-platform-tests/dom/nodes/Node-compareDocumentPosition.html:
* web-platform-tests/dom/nodes/Node-constants.html:
* web-platform-tests/dom/nodes/Node-contains-xml.xml:
* web-platform-tests/dom/nodes/Node-contains.html:
* web-platform-tests/dom/nodes/Node-insertBefore.html:
* web-platform-tests/dom/nodes/Node-isConnected.html:
* web-platform-tests/dom/nodes/Node-isEqualNode-xhtml.xhtml:
* web-platform-tests/dom/nodes/Node-isEqualNode.html:
* web-platform-tests/dom/nodes/Node-isSameNode.html:
* web-platform-tests/dom/nodes/Node-lookupNamespaceURI.html:
* web-platform-tests/dom/nodes/Node-lookupPrefix.xhtml:
* web-platform-tests/dom/nodes/Node-nodeName-xhtml.xhtml:
* web-platform-tests/dom/nodes/Node-nodeName.html:
* web-platform-tests/dom/nodes/Node-nodeValue.html:
* web-platform-tests/dom/nodes/Node-normalize.html:
* web-platform-tests/dom/nodes/Node-parentElement.html:
* web-platform-tests/dom/nodes/Node-parentNode.html:
* web-platform-tests/dom/nodes/Node-properties.html:
* web-platform-tests/dom/nodes/Node-removeChild.html:
* web-platform-tests/dom/nodes/Node-replaceChild.html:
* web-platform-tests/dom/nodes/Node-textContent.html:
* web-platform-tests/dom/nodes/NodeList-Iterable.html:
* web-platform-tests/dom/nodes/ParentNode-append.html:
* web-platform-tests/dom/nodes/ParentNode-prepend.html:
* web-platform-tests/dom/nodes/ParentNode-querySelector-All-xht.xht:
* web-platform-tests/dom/nodes/ParentNode-querySelector-All.html:
* web-platform-tests/dom/nodes/ProcessingInstruction-escapes-1.xhtml:
* web-platform-tests/dom/nodes/ProcessingInstruction-literal-1.xhtml:
* web-platform-tests/dom/nodes/ProcessingInstruction-literal-2.xhtml:
* web-platform-tests/dom/nodes/Text-constructor.html:
* web-platform-tests/dom/nodes/Text-splitText.html:
* web-platform-tests/dom/nodes/append-on-Document.html:
* web-platform-tests/dom/nodes/attributes-expected.txt:
* web-platform-tests/dom/nodes/attributes.html:
* web-platform-tests/dom/nodes/case.html:
* web-platform-tests/dom/nodes/getElementsByClassName-01.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-02.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-03.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-04.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-05.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-06.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-07.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-08.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-09.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-10.xml:
* web-platform-tests/dom/nodes/getElementsByClassName-11.xml:
* web-platform-tests/dom/nodes/getElementsByClassName-12.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-13.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-14.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-15.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-16.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-17.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-18.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-19.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-20.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-21.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-22.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-23.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-24.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-25.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-26.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-27.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-28.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-29.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-30.htm:
* web-platform-tests/dom/nodes/getElementsByClassName-31.htm:
* web-platform-tests/dom/nodes/insert-adjacent.html:
* web-platform-tests/dom/nodes/prepend-on-Document.html:
* web-platform-tests/dom/nodes/remove-unscopable.html:
* web-platform-tests/dom/nodes/rootNode.html:
* web-platform-tests/dom/nodes/w3c-import.log:
* web-platform-tests/dom/ranges/Range-attributes.html:
* web-platform-tests/dom/ranges/Range-cloneContents.html:
* web-platform-tests/dom/ranges/Range-cloneRange.html:
* web-platform-tests/dom/ranges/Range-collapse.html:
* web-platform-tests/dom/ranges/Range-commonAncestorContainer-2.html:
* web-platform-tests/dom/ranges/Range-commonAncestorContainer.html:
* web-platform-tests/dom/ranges/Range-compareBoundaryPoints.html:
* web-platform-tests/dom/ranges/Range-comparePoint-2.html:
* web-platform-tests/dom/ranges/Range-comparePoint.html:
* web-platform-tests/dom/ranges/Range-constructor.html:
* web-platform-tests/dom/ranges/Range-deleteContents.html:
* web-platform-tests/dom/ranges/Range-detach.html:
* web-platform-tests/dom/ranges/Range-extractContents.html:
* web-platform-tests/dom/ranges/Range-insertNode.html:
* web-platform-tests/dom/ranges/Range-intersectsNode-binding.html:
* web-platform-tests/dom/ranges/Range-intersectsNode.html:
* web-platform-tests/dom/ranges/Range-isPointInRange.html:
* web-platform-tests/dom/ranges/Range-mutations-appendChild.html:
* web-platform-tests/dom/ranges/Range-mutations-appendData.html:
* web-platform-tests/dom/ranges/Range-mutations-dataChange.html:
* web-platform-tests/dom/ranges/Range-mutations-deleteData.html:
* web-platform-tests/dom/ranges/Range-mutations-insertBefore.html:
* web-platform-tests/dom/ranges/Range-mutations-insertData.html:
* web-platform-tests/dom/ranges/Range-mutations-removeChild.html:
* web-platform-tests/dom/ranges/Range-mutations-replaceChild.html:
* web-platform-tests/dom/ranges/Range-mutations-replaceData.html:
* web-platform-tests/dom/ranges/Range-mutations-splitText.html:
* web-platform-tests/dom/ranges/Range-selectNode.html:
* web-platform-tests/dom/ranges/Range-set.html:
* web-platform-tests/dom/ranges/Range-stringifier.html:
* web-platform-tests/dom/ranges/Range-surroundContents.html:
* web-platform-tests/dom/traversal/NodeFilter-constants.html:
* web-platform-tests/dom/traversal/NodeIterator-removal.html:
* web-platform-tests/dom/traversal/NodeIterator.html:
* web-platform-tests/dom/traversal/TreeWalker-acceptNode-filter.html:
* web-platform-tests/dom/traversal/TreeWalker-basic.html:
* web-platform-tests/dom/traversal/TreeWalker-currentNode.html:
* web-platform-tests/dom/traversal/TreeWalker-previousNodeLastChildReject.html:
* web-platform-tests/dom/traversal/TreeWalker-previousSiblingLastChildSkip.html:
* web-platform-tests/dom/traversal/TreeWalker-traversal-reject.html:
* web-platform-tests/dom/traversal/TreeWalker-traversal-skip-most.html:
* web-platform-tests/dom/traversal/TreeWalker-traversal-skip.html:
* web-platform-tests/dom/traversal/TreeWalker-walking-outside-a-tree.html:
* web-platform-tests/dom/traversal/TreeWalker.html:

Source/WebCore:

Validating a qualified name should only throw InvalidCharacterError, not NamespaceError,
after:
- whatwg/dom#319
- web-platform-tests/wpt#5161
- whatwg/dom#423

Latest spec:
- https://dom.spec.whatwg.org/#validate

No new tests, updated web-platform-tests.

* dom/Document.cpp:
(WebCore::Document::parseQualifiedName):

LayoutTests:

Updated / rebaselined existing tests to reflect behavior change.

* fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt:
* fast/dom/DOMImplementation/createDocumentType-err-expected.txt:
* fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js:
* fast/dom/DOMImplementation/script-tests/createDocumentType-err.js:
* fast/dom/Document/createAttributeNS-namespace-err-expected.txt:
* fast/dom/Document/createElementNS-namespace-err-expected.txt:
* fast/dom/Document/script-tests/createAttributeNS-namespace-err.js:
* fast/dom/Document/script-tests/createElementNS-namespace-err.js:
* fast/dom/Element/script-tests/setAttributeNS-namespace-err.js:
* fast/dom/Element/setAttributeNS-namespace-err-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@215701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
[email protected] committed Apr 24, 2017
1 parent a98f878 commit 371f979
Show file tree
Hide file tree
Showing 296 changed files with 1,162 additions and 771 deletions.
20 changes: 20 additions & 0 deletions LayoutTests/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
2017-04-24 Chris Dumez <[email protected]>

createElementNS() should now throw only InvalidCharacterError, not NamespaceError
https://bugs.webkit.org/show_bug.cgi?id=171052

Reviewed by Sam Weinig.

Updated / rebaselined existing tests to reflect behavior change.

* fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt:
* fast/dom/DOMImplementation/createDocumentType-err-expected.txt:
* fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js:
* fast/dom/DOMImplementation/script-tests/createDocumentType-err.js:
* fast/dom/Document/createAttributeNS-namespace-err-expected.txt:
* fast/dom/Document/createElementNS-namespace-err-expected.txt:
* fast/dom/Document/script-tests/createAttributeNS-namespace-err.js:
* fast/dom/Document/script-tests/createElementNS-namespace-err.js:
* fast/dom/Element/script-tests/setAttributeNS-namespace-err.js:
* fast/dom/Element/setAttributeNS-namespace-err-expected.txt:

2017-04-24 Chris Dumez <[email protected]>

REGRESSION (214503): Webkit crash under RenderElement::repaintForPausedImageAnimationsIfNeeded() when scrolling giphy pages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ PASS createDocument("http://example.com/", "0div", null); threw INVALID_CHARACTE
PASS createDocument("http://example.com/", "di<v", null); threw INVALID_CHARACTER_ERR
PASS createDocument("http://example.com/", "-div", null); threw INVALID_CHARACTER_ERR
PASS createDocument("http://example.com/", ".div", null); threw INVALID_CHARACTER_ERR
PASS createDocument(null, ":div", null); threw NAMESPACE_ERR
PASS createDocument(null, "div:", null); threw NAMESPACE_ERR
PASS createDocument("http://example.com/", ":div", null); threw NAMESPACE_ERR
PASS createDocument("http://example.com/", "div:", null); threw NAMESPACE_ERR
PASS createDocument(null, ":div", null); threw INVALID_CHARACTER_ERR
PASS createDocument(null, "div:", null); threw INVALID_CHARACTER_ERR
PASS createDocument("http://example.com/", ":div", null); threw INVALID_CHARACTER_ERR
PASS createDocument("http://example.com/", "div:", null); threw INVALID_CHARACTER_ERR
PASS createDocument(null, "d:iv", null); threw NAMESPACE_ERR
PASS createDocument(null, "a:b:c", null); valid XML name, invalid QName; threw NAMESPACE_ERR
PASS createDocument("http://example.com/", "a:b:c", null); valid XML name, invalid QName; threw NAMESPACE_ERR
PASS createDocument(null, "a::c", null); valid XML name, invalid QName; threw NAMESPACE_ERR
PASS createDocument("http://example.com/", "a::c", null); valid XML name, invalid QName; threw NAMESPACE_ERR
PASS createDocument(null, "a:b:c", null); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR
PASS createDocument("http://example.com/", "a:b:c", null); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR
PASS createDocument(null, "a::c", null); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR
PASS createDocument("http://example.com/", "a::c", null); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR
PASS createDocument("http://example.com/", "a:0", null); valid XML name, not a valid QName; threw INVALID_CHARACTER_ERR
PASS createDocument("http://example.com/", "0:a", null); 0 at start makes it not a valid XML name; threw INVALID_CHARACTER_ERR
PASS createDocument("http://example.com/", "a:_", null)
FAIL createDocument("http://example.com/", "a:ெ", null); 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 createDocument("http://example.com/", "a:ெ", null); 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); threw INVALID_CHARACTER_ERR
PASS createDocument("http://example.com/", "ெ:a", null); 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 createDocument("http://example.com/", "a:aெ", null)
PASS createDocument("http://example.com/", "aெ:a", null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ PASS createDocumentType(null, null, null)
PASS exceptionThrown.name is "TypeError"
PASS exceptionThrown.name is "TypeError"
PASS exceptionThrown.name is "TypeError"
PASS createDocumentType("a:", null, null); threw NAMESPACE_ERR
PASS createDocumentType(":foo", null, null); threw NAMESPACE_ERR
PASS createDocumentType(":", null, null); threw NAMESPACE_ERR
PASS createDocumentType("a:", null, null); threw INVALID_CHARACTER_ERR
PASS createDocumentType(":foo", null, null); threw INVALID_CHARACTER_ERR
PASS createDocumentType(":", null, null); threw INVALID_CHARACTER_ERR
PASS createDocumentType("foo", null, null)
PASS createDocumentType("foo:bar", null, null)
PASS createDocumentType("foo::bar", null, null); threw NAMESPACE_ERR
PASS createDocumentType("foo::bar", null, null); threw INVALID_CHARACTER_ERR
PASS createDocumentType(" :bar", null, null); threw INVALID_CHARACTER_ERR
PASS createDocumentType("foo: ", null, null); threw INVALID_CHARACTER_ERR
PASS createDocumentType("foo :bar", null, null); threw INVALID_CHARACTER_ERR
PASS createDocumentType("foo: bar", null, null); threw INVALID_CHARACTER_ERR
PASS createDocumentType("a:b:c", null, null); valid XML name, invalid QName; threw NAMESPACE_ERR
PASS createDocumentType("a:b:c", null, null); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR
PASS successfullyParsed is true

TEST COMPLETE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@ var allNSTests = [
{ args: ["http://example.com/", "di<v"], code: 5 },
{ args: ["http://example.com/", "-div"], code: 5 },
{ args: ["http://example.com/", ".div"], code: 5 },
{ args: [null, ":div"], code: 14 },
{ args: [null, "div:"], code: 14 },
{ args: ["http://example.com/", ":div"], code: 14 },
{ args: ["http://example.com/", "div:"], code: 14 },
{ args: [null, ":div"], code: 5 },
{ args: [null, "div:"], code: 5 },
{ args: ["http://example.com/", ":div"], code: 5 },
{ args: ["http://example.com/", "div:"], code: 5 },
{ args: [null, "d:iv"], code: 14 },
{ args: [null, "a:b:c"], code: 14, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a:b:c"], code: 14, message: "valid XML name, invalid QName" },
{ args: [null, "a::c"], code: 14, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a::c"], code: 14, message: "valid XML name, invalid QName" },
{ args: [null, "a:b:c"], code: 5, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a:b:c"], code: 5, message: "valid XML name, invalid QName" },
{ args: [null, "a::c"], code: 5, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a::c"], code: 5, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a:0"], code: 5, message: "valid XML name, not a valid QName" },
{ args: ["http://example.com/", "0:a"], code: 5, message: "0 at start makes it not a valid XML name" },
{ args: ["http://example.com/", "a:_"] },
{ args: ["http://example.com/", "a:\u0BC6"], code: 14,
{ args: ["http://example.com/", "a:\u0BC6"], code: 5,
message: "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)" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ var allTests = [
{ args: [null, ""], name: "TypeError" },
{ args: ["", null], name: "TypeError" },
{ args: ["", ""], name: "TypeError" },
{ args: ["a:", null, null], code: 14 },
{ args: [":foo", null, null], code: 14 },
{ args: [":", null, null], code: 14 },
{ args: ["a:", null, null], code: 5 },
{ args: [":foo", null, null], code: 5 },
{ args: [":", null, null], code: 5 },
{ args: ["foo", null, null] },
{ args: ["foo:bar", null, null] },
{ args: ["foo::bar", null, null], code: 14 },
{ args: ["foo::bar", null, null], code: 5 },
{ args: ["\t:bar", null, null], code: 5 },
{ args: ["foo:\t", null, null], code: 5 },
{ args: ["foo :bar", null, null], code: 5 },
{ args: ["foo: bar", null, null], code: 5 },
{ args: ["a:b:c", null, null], code: 14, message: "valid XML name, invalid QName" },
{ args: ["a:b:c", null, null], code: 5, message: "valid XML name, invalid QName" },
];

function sourceify(v)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ PASS createAttributeNS("http://example.com/", "0div"); threw INVALID_CHARACTER_E
PASS createAttributeNS("http://example.com/", "di<v"); threw INVALID_CHARACTER_ERR
PASS createAttributeNS("http://example.com/", "-div"); threw INVALID_CHARACTER_ERR
PASS createAttributeNS("http://example.com/", ".div"); threw INVALID_CHARACTER_ERR
PASS createAttributeNS(null, ":div"); threw NAMESPACE_ERR
PASS createAttributeNS(null, "div:"); threw NAMESPACE_ERR
PASS createAttributeNS("http://example.com/", ":div"); threw NAMESPACE_ERR
PASS createAttributeNS("http://example.com/", "div:"); threw NAMESPACE_ERR
PASS createAttributeNS(null, ":div"); threw INVALID_CHARACTER_ERR
PASS createAttributeNS(null, "div:"); threw INVALID_CHARACTER_ERR
PASS createAttributeNS("http://example.com/", ":div"); threw INVALID_CHARACTER_ERR
PASS createAttributeNS("http://example.com/", "div:"); threw INVALID_CHARACTER_ERR
PASS createAttributeNS(null, "d:iv"); threw NAMESPACE_ERR
PASS createAttributeNS(null, "a:b:c"); valid XML name, invalid QName; threw NAMESPACE_ERR
PASS createAttributeNS("http://example.com/", "a:b:c"); valid XML name, invalid QName; threw NAMESPACE_ERR
PASS createAttributeNS(null, "a::c"); valid XML name, invalid QName; threw NAMESPACE_ERR
PASS createAttributeNS("http://example.com/", "a::c"); valid XML name, invalid QName; threw NAMESPACE_ERR
PASS createAttributeNS(null, "a:b:c"); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR
PASS createAttributeNS("http://example.com/", "a:b:c"); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR
PASS createAttributeNS(null, "a::c"); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR
PASS createAttributeNS("http://example.com/", "a::c"); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR
PASS createAttributeNS("http://example.com/", "a:0"); valid XML name, not a valid QName; threw INVALID_CHARACTER_ERR
PASS createAttributeNS("http://example.com/", "0:a"); 0 at start makes it not a valid XML name; threw INVALID_CHARACTER_ERR
PASS createAttributeNS("http://example.com/", "a:_")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ 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 NAMESPACE_ERR
PASS createElementNS(null, "div:"); threw NAMESPACE_ERR
PASS createElementNS("http://example.com/", ":div"); threw NAMESPACE_ERR
PASS createElementNS("http://example.com/", "div:"); threw NAMESPACE_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 NAMESPACE_ERR
PASS createElementNS("http://example.com/", "a:b:c"); valid XML name, invalid QName; threw NAMESPACE_ERR
PASS createElementNS(null, "a::c"); valid XML name, invalid QName; threw NAMESPACE_ERR
PASS createElementNS("http://example.com/", "a::c"); valid XML name, invalid QName; 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:_")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ var allNSTests = [
{ args: ["http://example.com/", "di<v"], code: 5 },
{ args: ["http://example.com/", "-div"], code: 5 },
{ args: ["http://example.com/", ".div"], code: 5 },
{ args: [null, ":div"], code: 14 },
{ args: [null, "div:"], code: 14 },
{ args: ["http://example.com/", ":div"], code: 14 },
{ args: ["http://example.com/", "div:"], code: 14 },
{ args: [null, ":div"], code: 5 },
{ args: [null, "div:"], code: 5 },
{ args: ["http://example.com/", ":div"], code: 5 },
{ args: ["http://example.com/", "div:"], code: 5 },
{ args: [null, "d:iv"], code: 14 },
{ args: [null, "a:b:c"], code: 14, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a:b:c"], code: 14, message: "valid XML name, invalid QName" },
{ args: [null, "a::c"], code: 14, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a::c"], code: 14, message: "valid XML name, invalid QName" },
{ args: [null, "a:b:c"], code: 5, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a:b:c"], code: 5, message: "valid XML name, invalid QName" },
{ args: [null, "a::c"], code: 5, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a::c"], code: 5, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a:0"], code: 5, message: "valid XML name, not a valid QName" },
{ args: ["http://example.com/", "0:a"], code: 5, message: "0 at start makes it not a valid XML name" },
{ args: ["http://example.com/", "a:_"] },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ var allNSTests = [
{ args: ["http://example.com/", "di<v"], code: 5 },
{ args: ["http://example.com/", "-div"], code: 5 },
{ args: ["http://example.com/", ".div"], code: 5 },
{ args: [null, ":div"], code: 14 },
{ args: [null, "div:"], code: 14 },
{ args: ["http://example.com/", ":div"], code: 14 },
{ args: ["http://example.com/", "div:"], code: 14 },
{ args: [null, ":div"], code: 5 },
{ args: [null, "div:"], code: 5 },
{ args: ["http://example.com/", ":div"], code: 5 },
{ args: ["http://example.com/", "div:"], code: 5 },
{ args: [null, "d:iv"], code: 14 },
{ args: [null, "a:b:c"], code: 14, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a:b:c"], code: 14, message: "valid XML name, invalid QName" },
{ args: [null, "a::c"], code: 14, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a::c"], code: 14, message: "valid XML name, invalid QName" },
{ args: [null, "a:b:c"], code: 5, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a:b:c"], code: 5, message: "valid XML name, invalid QName" },
{ args: [null, "a::c"], code: 5, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a::c"], code: 5, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a:0"], code: 5, message: "valid XML name, not a valid QName" },
{ args: ["http://example.com/", "0:a"], code: 5, message: "0 at start makes it not a valid XML name" },
{ args: ["http://example.com/", "a:_"] },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ var allNSTests = [
{ args: ["http://example.com/", "di<v"], code: 5 },
{ args: ["http://example.com/", "-div"], code: 5 },
{ args: ["http://example.com/", ".div"], code: 5 },
{ args: [null, ":div"], code: 14 },
{ args: [null, "div:"], code: 14 },
{ args: ["http://example.com/", ":div"], code: 14 },
{ args: ["http://example.com/", "div:"], code: 14 },
{ args: [null, ":div"], code: 5 },
{ args: [null, "div:"], code: 5 },
{ args: ["http://example.com/", ":div"], code: 5 },
{ args: ["http://example.com/", "div:"], code: 5 },
{ args: [null, "d:iv"], code: 14 },
{ args: [null, "a:b:c"], code: 14, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a:b:c"], code: 14, message: "valid XML name, invalid QName" },
{ args: [null, "a::c"], code: 14, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a::c"], code: 14, message: "valid XML name, invalid QName" },
{ args: [null, "a:b:c"], code: 5, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a:b:c"], code: 5, message: "valid XML name, invalid QName" },
{ args: [null, "a::c"], code: 5, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a::c"], code: 5, message: "valid XML name, invalid QName" },
{ args: ["http://example.com/", "a:0"], code: 5, message: "valid XML name, not a valid QName" },
{ args: ["http://example.com/", "0:a"], code: 5, message: "0 at start makes it not a valid XML name" },
{ args: ["http://example.com/", "a:_"] },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ PASS element.setAttributeNS("http://example.com/", "0div", 'value'); threw INVAL
PASS element.setAttributeNS("http://example.com/", "di<v", 'value'); threw INVALID_CHARACTER_ERR
PASS element.setAttributeNS("http://example.com/", "-div", 'value'); threw INVALID_CHARACTER_ERR
PASS element.setAttributeNS("http://example.com/", ".div", 'value'); threw INVALID_CHARACTER_ERR
PASS element.setAttributeNS(null, ":div", 'value'); threw NAMESPACE_ERR
PASS element.setAttributeNS(null, "div:", 'value'); threw NAMESPACE_ERR
PASS element.setAttributeNS("http://example.com/", ":div", 'value'); threw NAMESPACE_ERR
PASS element.setAttributeNS("http://example.com/", "div:", 'value'); threw NAMESPACE_ERR
PASS element.setAttributeNS(null, ":div", 'value'); threw INVALID_CHARACTER_ERR
PASS element.setAttributeNS(null, "div:", 'value'); threw INVALID_CHARACTER_ERR
PASS element.setAttributeNS("http://example.com/", ":div", 'value'); threw INVALID_CHARACTER_ERR
PASS element.setAttributeNS("http://example.com/", "div:", 'value'); threw INVALID_CHARACTER_ERR
PASS element.setAttributeNS(null, "d:iv", 'value'); threw NAMESPACE_ERR
PASS element.setAttributeNS(null, "a:b:c", 'value'); valid XML name, invalid QName; threw NAMESPACE_ERR
PASS element.setAttributeNS("http://example.com/", "a:b:c", 'value'); valid XML name, invalid QName; threw NAMESPACE_ERR
PASS element.setAttributeNS(null, "a::c", 'value'); valid XML name, invalid QName; threw NAMESPACE_ERR
PASS element.setAttributeNS("http://example.com/", "a::c", 'value'); valid XML name, invalid QName; threw NAMESPACE_ERR
PASS element.setAttributeNS(null, "a:b:c", 'value'); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR
PASS element.setAttributeNS("http://example.com/", "a:b:c", 'value'); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR
PASS element.setAttributeNS(null, "a::c", 'value'); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR
PASS element.setAttributeNS("http://example.com/", "a::c", 'value'); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR
PASS element.setAttributeNS("http://example.com/", "a:0", 'value'); valid XML name, not a valid QName; threw INVALID_CHARACTER_ERR
PASS element.setAttributeNS("http://example.com/", "0:a", 'value'); 0 at start makes it not a valid XML name; threw INVALID_CHARACTER_ERR
PASS element.setAttributeNS("http://example.com/", "a:_", 'value')
Expand Down
Loading

0 comments on commit 371f979

Please sign in to comment.