Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(737)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Node/script-tests/normalize-with-cdata.js

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 description('Test of normalize on an XML document with CDATA.');
2
3 var parser = new DOMParser();
4 var serializer = new XMLSerializer();
5
6 var xmlChunk = parser.parseFromString(
7 '<foo>' +
8 'This is some text before the CDATA' +
9 '<![CDATA[This is some <bold>markup</bold> inside of a CDATA]]>' +
10 'This is some text after the CDATA' +
11 '</foo>',
12 'application/xml');
13
14 debug('Before normalize');
15 shouldBe('serializer.serializeToString(xmlChunk)', '"<foo>This is some text befo re the CDATA<![CDATA[This is some <bold>markup</bold> inside of a CDATA]]>This i s some text after the CDATA</foo>"');
16 shouldBe('xmlChunk.documentElement.childNodes.length', '3');
17 xmlChunk.documentElement.normalize();
18 debug('After normalize');
19 shouldBe('serializer.serializeToString(xmlChunk)', '"<foo>This is some text befo re the CDATA<![CDATA[This is some <bold>markup</bold> inside of a CDATA]]>This i s some text after the CDATA</foo>"');
20 shouldBe('xmlChunk.documentElement.childNodes.length', '3');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698