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

Side by Side Diff: third_party/WebKit/LayoutTests/dom/domparsing/xmlserializer-attribute-ns-prefix.html

Issue 2667303004: Move tests for DOMParser and XMLSerializer to dom/domparsing/. (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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <body> 2 <body>
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 <script> 4 <script>
5 5
6 description('This tests that XMLSerializer emits a correct namespace declaration for the <image> element. The first line is serialized as part of a DocumentFrag ment. The second line is serialized as part of the Document.'); 6 description('This tests that XMLSerializer emits a correct namespace declaration for the <image> element. The first line is serialized as part of a DocumentFrag ment. The second line is serialized as part of the Document.');
7 7
8 var svgDoc = new DOMParser().parseFromString('<svg xmlns="http://www.w3.org/2000 /svg" xmlns:xlink="http://www.w3.org/1999/xlink"></svg>', 'text/xml'); 8 var svgDoc = new DOMParser().parseFromString('<svg xmlns="http://www.w3.org/2000 /svg" xmlns:xlink="http://www.w3.org/1999/xlink"></svg>', 'text/xml');
9 var svgEl = svgDoc.firstChild; 9 var svgEl = svgDoc.firstChild;
10 var imageEl = document.createElementNS('http://www.w3.org/2000/svg', 'image'); 10 var imageEl = document.createElementNS('http://www.w3.org/2000/svg', 'image');
11 imageEl.setAttributeNS('http://www.w3.org/1999/xlink', 'href', 'blah'); 11 imageEl.setAttributeNS('http://www.w3.org/1999/xlink', 'href', 'blah');
12 svgEl.appendChild(imageEl); 12 svgEl.appendChild(imageEl);
13 13
14 var serializer = new XMLSerializer(); 14 var serializer = new XMLSerializer();
15 15
16 debug(escapeHTML(serializer.serializeToString(svgEl))); 16 debug(escapeHTML(serializer.serializeToString(svgEl)));
17 document.body.appendChild(svgDoc.removeChild(svgEl)); 17 document.body.appendChild(svgDoc.removeChild(svgEl));
18 debug(escapeHTML(serializer.serializeToString(svgEl))); 18 debug(escapeHTML(serializer.serializeToString(svgEl)));
19 19
20 document.body.removeChild(svgEl); 20 document.body.removeChild(svgEl);
21 </script> 21 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698