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 522153 629c2a5b9013de68ac0e96f3792d0959803db9c8
parent 522152 78d3aefc44182764ee01790175826e4d800a29d8
child 522154 d3e10f10f4c2acb28ce6ee88930c55f5d2c0c809
push id10871
push usercbrindusan@mozilla.com
push dateMon, 18 Mar 2019 15:49:32 +0000
treeherdermozilla-beta@018abdd16060 [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>