author | Kent Tamura <tkent@chromium.org> |
Mon, 18 Feb 2019 19:25:00 +0000 | |
changeset 461290 | 29a5999a6eb11702dafbd85b17ddc979e54bc79e |
parent 461289 | db60e08e38e92b2cb23e0209007f123cda0e8e7a |
child 461291 | 0390eb5bdf53561523d61429d7ffbf268ad1429a |
push id | 35622 |
push user | ncsoregi@mozilla.com |
push date | Wed, 27 Feb 2019 04:32:15 +0000 |
treeherder | mozilla-central@5b8896aa3f69 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | testonly |
bugs | 1526595, 15260, 928639, 1454070, 629490 |
milestone | 67.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
testing/web-platform/tests/domparsing/XMLSerializer-serializeToString.html | file | annotate | diff | comparison | revisions |
--- a/testing/web-platform/tests/domparsing/XMLSerializer-serializeToString.html +++ b/testing/web-platform/tests/domparsing/XMLSerializer-serializeToString.html @@ -50,11 +50,21 @@ test(function() { root.setAttribute('attr', '\n'); assert_in_array(serializer.serializeToString(root), [ '<root attr="
"/>', '<root attr=" "/>']); root.setAttribute('attr', '\r'); assert_in_array(serializer.serializeToString(root), [ '<root attr="
"/>', '<root attr=" "/>']); }, 'check XMLSerializer.serializeToString escapes attribute values for roundtripping'); +test(function() { + const input = '<root><child1/><child2/></root>'; + const root = (new DOMParser()).parseFromString(input, 'text/xml').documentElement; + root.firstChild.setAttributeNS('uri1', 'attr1', 'value1'); + root.firstChild.setAttributeNS('uri2', 'attr2', 'value2'); + root.lastChild.setAttributeNS('uri3', 'attr3', 'value3'); + const xmlString = (new XMLSerializer()).serializeToString(root); + assert_equals(xmlString, '<root><child1 xmlns:ns1="uri1" ns1:attr1="value1" xmlns:ns2="uri2" ns2:attr2="value2"/><child2 xmlns:ns3="uri3" ns3:attr3="value3"/></root>'); +}, 'Check if generated prefixes match to "ns${index}".'); + </script> </body> </html>