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

Unified Diff: LayoutTests/fast/dom/XMLSerializer-attribute-ns-prefix.html

Issue 177763002: Fix serialization of (xlink:)href attributes in document fragments (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use js-test framework. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/XMLSerializer-attribute-ns-prefix-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/XMLSerializer-attribute-ns-prefix.html
diff --git a/LayoutTests/fast/dom/XMLSerializer-attribute-ns-prefix.html b/LayoutTests/fast/dom/XMLSerializer-attribute-ns-prefix.html
new file mode 100644
index 0000000000000000000000000000000000000000..5131ea17dcf5ea0ff9413b5d4db1fac41d1d1b3f
--- /dev/null
+++ b/LayoutTests/fast/dom/XMLSerializer-attribute-ns-prefix.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<body>
+<script src="../../resources/js-test.js"></script>
+<script>
+
+description('This tests that XMLSerializer emits a correct namespace declaration for the <image> element. The first line is serialized as part of a DocumentFragment. The second line is serialized as part of the Document.');
+
+var svgDoc = new DOMParser().parseFromString('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"></svg>', 'text/xml');
+var svgEl = svgDoc.firstChild;
+var imageEl = document.createElementNS('http://www.w3.org/2000/svg', 'image');
+imageEl.setAttributeNS('http://www.w3.org/1999/xlink', 'href', 'blah');
+svgEl.appendChild(imageEl);
+
+var serializer = new XMLSerializer();
+
+debug(escapeHTML(serializer.serializeToString(svgEl)));
+document.body.appendChild(svgDoc.removeChild(svgEl));
+debug(escapeHTML(serializer.serializeToString(svgEl)));
+
+document.body.removeChild(svgEl);
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/XMLSerializer-attribute-ns-prefix-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698