Bug 1528029 [wpt PR 15376] - Remove a special handling for XLink namespace in XMLSerializer, a=testonly
authorKent Tamura <tkent@chromium.org>
Tue, 05 Mar 2019 12:13:23 +0000
changeset 525430 9af6b8db40bd483d631ba7535aa16a3de3ae345f
parent 525429 c673e6572713ed725b687ef7bab2febed077e106
child 525431 b172a1750aecc02b5489415c7b78474918a5f236
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1528029, 15376, 927626, 1469843, 631984
milestone67.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
Bug 1528029 [wpt PR 15376] - Remove a special handling for XLink namespace in XMLSerializer, a=testonly Automatic update from web-platform-tests Remove a special handling for XLink namespace in XMLSerializer The new behavior matches to the standard, Firefox, and Safari. Bug: 927626 Change-Id: Ifc6687992c10fbca13faaaeb4a56e59f5469f594 Reviewed-on: https://chromium-review.googlesource.com/c/1469843 Reviewed-by: Yoshifumi Inoue <yosin@chromium.org> Commit-Queue: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#631984} -- wpt-commits: 6fb30bc55bf721c87d2ff32640deefc1b01061ab wpt-pr: 15376
testing/web-platform/tests/domparsing/XMLSerializer-serializeToString.html
--- a/testing/web-platform/tests/domparsing/XMLSerializer-serializeToString.html
+++ b/testing/web-platform/tests/domparsing/XMLSerializer-serializeToString.html
@@ -147,11 +147,21 @@ test(function() {
   const root = (new DOMParser()).parseFromString(input, 'text/xml').documentElement;
   root.firstChild.setAttributeNS('uri3', 'attr1', 'value1');
   const xmlString = (new XMLSerializer()).serializeToString(root);
   // According to 'DOM Parsing and Serialization' draft as of 2018-12-11,
   // 'generate a prefix' result can conflict with an existing xmlns:ns* declaration.
   assert_equals(xmlString, '<root xmlns:ns2="uri2"><child xmlns:ns1="uri1" xmlns:ns1="uri3" ns1:attr1="value1"/></root>');
 }, 'Check if "ns1" is generated even if the element already has xmlns:ns1.');
 
+test(function() {
+  const root = (new Document()).createElement('root');
+  root.setAttributeNS('http://www.w3.org/1999/xlink', 'href', 'v');
+  assert_equals(serialize(root), '<root xmlns:ns1="http://www.w3.org/1999/xlink" ns1:href="v"/>');
+
+  const root2 = (new Document()).createElement('root');
+  root2.setAttributeNS('http://www.w3.org/1999/xlink', 'xl:type', 'v');
+  assert_equals(serialize(root2), '<root xmlns:xl="http://www.w3.org/1999/xlink" xl:type="v"/>');
+}, 'Check if no special handling for XLink namespace unlike HTML serializer.');
+
 </script>
  </body>
 </html>