summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/XMLSerializer-entities-2.html
blob: 82542709f50a5a3c3e73bb19240523bdd669a126 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!doctype html>
<title>XMLSerializer serializes entities to XML-compatible format</title>
<script src=../../resources/testharness.js></script>
<script src=../../resources/testharnessreport.js></script>
<div id=log></div>
<script>
test(function() {
    var s = '<svg xmlns="http://www.w3.org/2000/svg">\u00a0</svg>';
    var svgDoc = new DOMParser().parseFromString(s, 'text/xml');
    var svgRoot = svgDoc.removeChild(svgDoc.firstChild);
    var result1 = new XMLSerializer().serializeToString(svgRoot);
    document.body.appendChild(svgRoot);
    var result2 = new XMLSerializer().serializeToString(svgRoot);
    document.body.removeChild(svgRoot);
    assert_equals(result1, result2);
}, 'XMLSerializer: Serializes entities to XML-compatible format regardless of ownerDocument.');
</script>