Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
document.createProcessingInstruction() does not behave according to s…
…pecification https://bugs.webkit.org/show_bug.cgi?id=148710 Reviewed by Ryosuke Niwa. Source/WebCore: document.createProcessingInstruction() does not behave according to specification: https://dom.spec.whatwg.org/#dom-document-createprocessinginstruction The following changes were made in this patch to match the specification and the behavior of Firefox / Chrome: 1. document.createProcessingInstruction() now works for HTML documents. 2. Throw an InvalidCharacterError if the data contains "?>" (step 2 of spec) No new tests, already covered by existing tests that are rebaselined in this patch. * dom/Document.cpp: (WebCore::Document::createProcessingInstruction): LayoutTests: Update / rebaseline existing tests. * dom/html/level1/core/documentinvalidcharacterexceptioncreatepi-expected.txt: * dom/html/level1/core/documentinvalidcharacterexceptioncreatepi1-expected.txt: * fast/dom/Node/initial-values-expected.txt: * fast/dom/Node/script-tests/initial-values.js: * http/tests/w3c/dom/nodes/CharacterData-remove-expected.txt: * http/tests/w3c/dom/nodes/Document-createProcessingInstruction-expected.txt: * http/tests/w3c/dom/nodes/Document-createProcessingInstruction-xhtml-expected.txt: * http/tests/w3c/dom/nodes/Node-cloneNode-expected.txt: * http/tests/w3c/dom/nodes/Node-insertBefore-expected.txt: * http/tests/w3c/dom/nodes/Node-nodeValue-expected.txt: * http/tests/w3c/dom/nodes/Node-textContent-expected.txt: Canonical link: https://commits.webkit.org/166831@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
14 changed files
with
121 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,2 +1,3 @@ | ||
Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentinvalidcharacterexceptioncreatepi | ||
Status: Success | ||
Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentinvalidcharacterexceptioncreatepi | ||
Status: failure | ||
Detail: throw_NOT_SUPPORTED_ERR: assertTrue failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,2 +1,3 @@ | ||
Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentinvalidcharacterexceptioncreatepi1 | ||
Status: Success | ||
Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentinvalidcharacterexceptioncreatepi1 | ||
Status: failure | ||
Detail: throw_NOT_SUPPORTED_ERR: assertTrue failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,2 +1,14 @@ | ||
|
||
Harness Error. harness_status.status = 1 , harness_status.message = Error: NotSupportedError: DOM Exception 9 | ||
PASS text should support remove() | ||
PASS remove() should work if text doesn't have a parent | ||
PASS remove() should work if text does have a parent | ||
PASS remove() should work if text does have a parent and siblings | ||
PASS comment should support remove() | ||
PASS remove() should work if comment doesn't have a parent | ||
PASS remove() should work if comment does have a parent | ||
PASS remove() should work if comment does have a parent and siblings | ||
PASS PI should support remove() | ||
PASS remove() should work if PI doesn't have a parent | ||
PASS remove() should work if PI does have a parent | ||
PASS remove() should work if PI does have a parent and siblings | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,15 +1,14 @@ | ||
|
||
PASS Document.createProcessingInstruction in HTML documents | ||
FAIL Should throw an INVALID_CHARACTER_ERR for target "A" and data "?>". assert_throws: function "function () { | ||
document.createProcessingInstructio..." threw object "Error: NotSupportedError: DOM Exception 9" that is not a DOMException INVALID_CHARACTER_ERR: property "code" is equal to 9, expected 5 | ||
PASS Should throw an INVALID_CHARACTER_ERR for target "A" and data "?>". | ||
PASS Should throw an INVALID_CHARACTER_ERR for target "·A" and data "x". | ||
PASS Should throw an INVALID_CHARACTER_ERR for target "×A" and data "x". | ||
PASS Should throw an INVALID_CHARACTER_ERR for target "A×" and data "x". | ||
PASS Should throw an INVALID_CHARACTER_ERR for target "\\A" and data "x". | ||
PASS Should throw an INVALID_CHARACTER_ERR for target "\f" and data "x". | ||
PASS Should throw an INVALID_CHARACTER_ERR for target 0 and data "x". | ||
PASS Should throw an INVALID_CHARACTER_ERR for target "0" and data "x". | ||
FAIL Should get a ProcessingInstruction for target "xml:fail" and data "x". NotSupportedError: DOM Exception 9 | ||
FAIL Should get a ProcessingInstruction for target "A·A" and data "x". NotSupportedError: DOM Exception 9 | ||
FAIL Should get a ProcessingInstruction for target "a0" and data "x". NotSupportedError: DOM Exception 9 | ||
PASS Should get a ProcessingInstruction for target "xml:fail" and data "x". | ||
PASS Should get a ProcessingInstruction for target "A·A" and data "x". | ||
PASS Should get a ProcessingInstruction for target "a0" and data "x". | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters