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
2010-10-27 Adam Barth <abarth@webkit.org>
Reviewed by Ojan Vafai. REGRESSION(66511): CORDYS Process Factory doesn't work https://bugs.webkit.org/show_bug.cgi?id=48453 Test some appendChild cases that didn't have coverage before. * fast/dom/allowed-children-expected.txt: Added. * fast/dom/allowed-children.html: Added. 2010-10-27 Adam Barth <abarth@webkit.org> Reviewed by Ojan Vafai. REGRESSION(66511): CORDYS Process Factory doesn't work https://bugs.webkit.org/show_bug.cgi?id=48453 When Ojan refactored this function in 66511, he missed an "else", which causes us to generated HIERARCHY_REQUEST_ERR in some cases where we're not supposed to. This patch restores the "else" behavior (using an early return) and adds a test for the cases that caused problems in the field. Test: fast/dom/allowed-children.html * dom/Node.cpp: (WebCore::isChildTypeAllowed): Canonical link: https://commits.webkit.org/61236@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@70718 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
5 changed files
with
93 additions
and
1 deletion.
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
@@ -0,0 +1,17 @@ | ||
This test ensures that objects RGBColor objects return the correct values. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS u.tagName is 'Long' | ||
PASS (new XMLSerializer()).serializeToString(doc) is '<Long/>' | ||
PASS u.tagName is 'Long' | ||
PASS (new XMLSerializer()).serializeToString(doc) is '<Long><b>15</b></Long>' | ||
PASS u.tagName is 'Long' | ||
PASS (new XMLSerializer()).serializeToString(doc) is '<Long id="1">1</Long>' | ||
PASS u.tagName is 'Long' | ||
PASS (new XMLSerializer()).serializeToString(doc) is '<Long id="1">15<b>1</b>16</Long>' | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
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
@@ -0,0 +1,45 @@ | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="../js/resources/js-test-style.css"> | ||
<script src="../js/resources/js-test-pre.js"></script> | ||
</head> | ||
<body> | ||
<p id="description"></p> | ||
<div id="console"></div> | ||
<script> | ||
description("This test ensures that objects RGBColor objects return the correct values."); | ||
|
||
var cases = [ | ||
{ | ||
"markup": "<Long />", | ||
"tagName": "'Long'", | ||
"serialization": "'<Long/>'" | ||
}, { | ||
"markup": "<Long><b>15</b></Long>", | ||
"tagName": "'Long'", | ||
"serialization": "'<Long><b>15</b></Long>'" | ||
}, { | ||
"markup": "<Long id='1'>1</Long>", | ||
"tagName": "'Long'", | ||
"serialization": "'<Long id=\"1\">1</Long>'" | ||
}, { | ||
"markup": "<Long id='1'>15<b>1</b>16</Long>", | ||
"tagName": "'Long'", | ||
"serialization": "'<Long id=\"1\">15<b>1</b>16</Long>'" | ||
} | ||
]; | ||
|
||
for (var i = 0; i < cases.length; ++i) { | ||
var doc = document.implementation.createDocument("", "", null); | ||
var doc2 = (new DOMParser()).parseFromString(cases[i].markup, "text/xml"); | ||
var u = doc.importNode(doc2.childNodes[0], true); | ||
shouldBe("u.tagName", cases[i].tagName); | ||
doc.appendChild(u); | ||
shouldBe("(new XMLSerializer()).serializeToString(doc)", cases[i].serialization); | ||
} | ||
|
||
successfullyParsed = true; | ||
</script> | ||
<script src="../js/resources/js-test-post.js"></script> | ||
</body> | ||
</html> |
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