| Index: LayoutTests/fast/dom/Node/script-tests/normalize-with-cdata.js
|
| diff --git a/LayoutTests/fast/dom/Node/script-tests/normalize-with-cdata.js b/LayoutTests/fast/dom/Node/script-tests/normalize-with-cdata.js
|
| index f15671cb297551893414492c04ee795c8c363b65..dd4fbed712c393bc7457c13a9482941c1445df3c 100644
|
| --- a/LayoutTests/fast/dom/Node/script-tests/normalize-with-cdata.js
|
| +++ b/LayoutTests/fast/dom/Node/script-tests/normalize-with-cdata.js
|
| @@ -6,11 +6,16 @@ var serializer = new XMLSerializer();
|
| var xmlChunk = parser.parseFromString(
|
| '<foo>' +
|
| 'This is some text before the CDATA' +
|
| - '<![CDATA[This is some <bold>markup</bold> inside of a CDATA]]>' +
|
| + // The parser converts CDATA to Text, so the script converts this comment to CDATA.
|
| + '<!--This is some <bold>markup</bold> inside of a CDATA-->' +
|
| 'This is some text after the CDATA' +
|
| '</foo>',
|
| 'application/xml');
|
|
|
| +var comment = xmlChunk.documentElement.childNodes[1];
|
| +var cdata = document.implementation.createDocument(null, null).createCDATASection(comment.data);
|
| +xmlChunk.documentElement.replaceChild(cdata, comment);
|
| +
|
| debug('Before normalize');
|
| shouldBe('serializer.serializeToString(xmlChunk)', '"<foo>This is some text before the CDATA<![CDATA[This is some <bold>markup</bold> inside of a CDATA]]>This is some text after the CDATA</foo>"');
|
| shouldBe('xmlChunk.documentElement.childNodes.length', '3');
|
|
|